Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4617584rwi; Sat, 22 Oct 2022 13:12:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4AesMnEue3K8WTM246vmADEx4osQYMOLc3SJdCDSE50CoZ9ZrVm+IVBTNiXOnz+kiSoyWB X-Received: by 2002:a17:906:478d:b0:7a3:cf5e:9027 with SMTP id cw13-20020a170906478d00b007a3cf5e9027mr1315944ejc.718.1666469547554; Sat, 22 Oct 2022 13:12:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666469547; cv=none; d=google.com; s=arc-20160816; b=Ea8/1MJSqGJzeffdHg26XzLJaNb6bXIHp6MEyG2quJYgVnP64NgsAOIMV39sL9bA6g cbnmSGW8NQKcCQkvBQetWJuwF3qCKUQv1Vly9iZA9VLe02AJHjGHYjEvB+SdHiwgef5V GYp0DjhR6OA4rfiN3RP/gs9U4fl/9O1YdUVJwVd5yTs+dCu8my/UGh/BGWW4dwFtsM3A X8hClZaKDpJCsEd5IKmK7tcofMQ3WBWZnGhCj69AHcuSiMj0jlDAtl5wSgCP0ntH++vG lxjp0djpw1Ba3EmFS6053m25Ie7sy4RjTRHN4DWizaWJDKMcHjiITcx84uhvoF6ymla/ 2+ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=sHGL6yavrY5/6vl7SO9zBJVEn91I0PeYftQSy3Ym7Uc=; b=VZutzvYtWcHW+PqJwiIKTQfAwbvnn3SzANFN4x8PCPf1B9JX28X1/Dlz8GqoQN8bf3 LMatEsLN1DeDk+2f9qX+r/Tl9/zXWK6Oya6OMfxT391odoIOFGrg0xozLwMQXEYBmW9f 8uU56A2VA27s2iEzDquYcmMU/1NbNpds9gkqvYu75wJ0B3DOOA5EKMjbUhJX6gO4m89m KzvOzRXBg6kBi+9f8G1iqIWkSfxOevgFXprXlpKhgz8lNcTQUgfljWLb6bmqEFIIAI+L qUyW3EzHUeFxeN0nyDKlX9C3EKOqfzHAyFJuvbOMfxoQstJiCEzbYAxz9qMohxoewL++ eOAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot1-20020a170906ccc100b007799e328e10si21055767ejb.999.2022.10.22.13.12.01; Sat, 22 Oct 2022 13:12:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229692AbiJVTeW (ORCPT + 99 others); Sat, 22 Oct 2022 15:34:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbiJVTeT (ORCPT ); Sat, 22 Oct 2022 15:34:19 -0400 Received: from outbound-smtp35.blacknight.com (outbound-smtp35.blacknight.com [46.22.139.218]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8022B10EE70 for ; Sat, 22 Oct 2022 12:34:17 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp35.blacknight.com (Postfix) with ESMTPS id ADE8A2363 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> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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