From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77880C04A95 for ; Sat, 22 Oct 2022 19:34:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A01F18E0002; Sat, 22 Oct 2022 15:34:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9B1B38E0001; Sat, 22 Oct 2022 15:34:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A0D08E0002; Sat, 22 Oct 2022 15:34:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 7B4EB8E0001 for ; Sat, 22 Oct 2022 15:34:18 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5095EAAC6D for ; Sat, 22 Oct 2022 19:34:18 +0000 (UTC) X-FDA: 80049586596.25.5A56C8C Received: from outbound-smtp59.blacknight.com (outbound-smtp59.blacknight.com [46.22.136.243]) by imf24.hostedemail.com (Postfix) with ESMTP id 6D329180006 for ; Sat, 22 Oct 2022 19:34:17 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp59.blacknight.com (Postfix) with ESMTPS id B131CFAF19 for ; Sat, 22 Oct 2022 20:34:15 +0100 (IST) Received: (qmail 2763 invoked from network); 22 Oct 2022 19:34:15 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 22 Oct 2022 19:34:15 -0000 Date: Sat, 22 Oct 2022 20:34:13 +0100 From: Mel Gorman To: Hugh Dickins Cc: Andrew Morton , Matthew Wilcox , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm: prep_compound_tail() clear page->private Message-ID: <20221022193413.ihgfs5ipy3la3c6a@techsingularity.net> References: <1c4233bb-4e4d-5969-fbd4-96604268a285@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1c4233bb-4e4d-5969-fbd4-96604268a285@google.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666467258; a=rsa-sha256; cv=none; b=kF2hhgBf32/uTrSx9j6SbEDdBfO20IQiHIAY2EeioGQYrxfpi1oI/rHyBOqZzbV0kT+pIe xx3N2YnRCeKZ8ioutSJyNeTMnyaQBWFcVArbA/PwMe+CjfN6apnysao9isM7y3nUO0q66Y D1Dab8lSrVkk2FoDZJFHnWJN7xxCB8Y= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.243 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666467258; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sHGL6yavrY5/6vl7SO9zBJVEn91I0PeYftQSy3Ym7Uc=; b=wrZy0AqVVtXQCpH/lPJDKQn24Ljx6OUKMfwZ38SbN90/o5uHHkuJ3LziTBI+7wZ/PaQKiF lGGuFbPqFEzaaY0Ek8ONjjRV6BNWB57LtqRrKBtlviiduY7bDKIFqIdKutmq0MtuL33d/z hM5OQGhhsAyTlz+C8M0HgvQkKnbju4w= X-Stat-Signature: 5yxr4oif1mhbjy7aodqqx4ouf8en3siq X-Rspamd-Queue-Id: 6D329180006 Authentication-Results: imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.243 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1666467257-709034 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Oct 22, 2022 at 12:51:06AM -0700, Hugh Dickins wrote: > Although page allocation always clears page->private in the first page > or head page of an allocation, it has never made a point of clearing > page->private in the tails (though 0 is often what is already there). > > But now commit 71e2d666ef85 ("mm/huge_memory: do not clobber swp_entry_t > during THP split") issues a warning when page_tail->private is found to > be non-0 (unless it's swapcache). > > Change that warning to dump page_tail (which also dumps head), instead > of just the head: so far we have seen dead000000000122, dead000000000003, > dead000000000001 or 0000000000000002 in the raw output for tail private. > The intent behind dumping the head was because I expected we'd be mid-split and the head page was more meaningful but your patch also works. > We could just delete the warning, but today's consensus appears to want > page->private to be 0, unless there's a good reason for it to be set: This was also on purpose. I suspected the warning would create a few new reports but if page->private should be 0 then it's better to start catching it now instead of later. At least we're still in an early rc kernel. > so now clear it in prep_compound_tail() (more general than just for THP; > but not for high order allocation, which makes no pass down the tails). > > Fixes: 71e2d666ef85 ("mm/huge_memory: do not clobber swp_entry_t during THP split") > Signed-off-by: Hugh Dickins > Cc: Mel Gorman > Cc: Matthew Wilcox (Oracle) > Cc: Thanks Hugh. Acked-by: Mel Gorman -- Mel Gorman SUSE Labs