Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp563631rwi; Thu, 20 Oct 2022 02:17:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4g26NYpM5e8bXwxMsb++UTJDYtMYcLj7O5zF5+aHVpT9q/sztgVnC6FG/LLrDo21huolsM X-Received: by 2002:a63:a548:0:b0:462:9d00:1835 with SMTP id r8-20020a63a548000000b004629d001835mr10826033pgu.442.1666257469654; Thu, 20 Oct 2022 02:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666257469; cv=none; d=google.com; s=arc-20160816; b=dS+wclMrM6rJNaJ3c9SrGaB4RUjyKUNx3thLBKslk+AGtIl88BOjW1zZcM1epbc2iQ 4hNeSuxAL1Sha9E5gZNktnQh2vOBM0XJxO4EtEkuZp6xGlqaQnkqV6iDSStMWx9MIrbG OjJFPtvTpPKcPTkU+QS9sK2udz5YK6Y1jifn+DaWKFjZTlC6kOua/87ZFObpcIULpiC0 vWVo7kIr/RKWtHmHgFngy7iutOPajJ9mpBt7Z2SmYQOdh2TmyYrhVsl+A/lpsslmzfjm hEett92B21HBTDFIe6Ntl+/j5CeubeMpkdD+ukRriHUUsLlI016YiA/lR72qKHrIkG+y BVyA== 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=Q152pgKpvF13sFF8WIV138r5EWMJA0mm+MW4LzuifQ8=; b=0U2YXDO3k5/iMKOTcN7rhE94smW/N+hqEElquoIdfEPCk12qkkASZTLRpb+koDLv50 HgE4guROuIeyLJyhYTyWnv4Y5c6zHohO32DlonLEsbhmaaSfPcxoxcEOm4T4URpoJxFJ ZJk/iNP23TxdtHuGjzVC8M8iLltqBSsMhj/D84Boa+Ffzk16vXFNJ9Hm0AqT0eM01WJK TS+MsNMCHTRCjSranQuyDkLT8fcQoJCnha45Ksj0yW3jkhgHomt4RCQO2h0NKvWNkrfW +/wORc3GOj1JJwMY6OE+SP27EBKZGGKJRh1ovOMqS6bkoPVnUs7R7FwyTxTj4CpdtH6C gVHQ== 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 m27-20020a638c1b000000b0044adcee18b2si20800196pgd.277.2022.10.20.02.17.36; Thu, 20 Oct 2022 02:17:49 -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 S229956AbiJTIwy (ORCPT + 99 others); Thu, 20 Oct 2022 04:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbiJTIwa (ORCPT ); Thu, 20 Oct 2022 04:52:30 -0400 Received: from outbound-smtp19.blacknight.com (outbound-smtp19.blacknight.com [46.22.139.246]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B2D192BB1 for ; Thu, 20 Oct 2022 01:52:19 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp19.blacknight.com (Postfix) with ESMTPS id D70D41C4F60 for ; Thu, 20 Oct 2022 09:52:17 +0100 (IST) Received: (qmail 17092 invoked from network); 20 Oct 2022 08:52:17 -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); 20 Oct 2022 08:52:17 -0000 Date: Thu, 20 Oct 2022 09:52:14 +0100 From: Mel Gorman To: Andrew Morton Cc: Yang Shi , Matthew Wilcox , Linux-MM , LKML , Brian Foster Subject: Re: [RFC PATCH] mm/huge_memory: Do not clobber swp_entry_t during THP split Message-ID: <20221020085214.7pgvylgxkojbiuat@techsingularity.net> References: <20221019134156.zjyyn5aownakvztf@techsingularity.net> <20221019161810.7510df1f37658a2b71c5e3a7@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20221019161810.7510df1f37658a2b71c5e3a7@linux-foundation.org> 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 Adding Brian to cc On Wed, Oct 19, 2022 at 04:18:10PM -0700, Andrew Morton wrote: > On Wed, 19 Oct 2022 11:17:14 -0700 Yang Shi wrote: > > > > The intent of commit b653db77350c patch was to avoid the case where > > > PG_private is clear but folio->private is not-NULL. However, THP tail > > > pages uses page->private for "swp_entry_t if folio_test_swapcache()" as > > > stated in the documentation for struct folio. This patch only clobbers > > > page->private for tail pages if the head page was not in swapcache and > > > warns once if page->private had an unexpected value. > > > > It looks like the same issue fixed by > > https://lore.kernel.org/linux-mm/20220906190602.1626037-1-bfoster@redhat.com/ > > It is. > Yep, based on Brian's changelog, it was the same workload that triggered it as it happens to stress the corner case that hits the bug. > As I asked earlier this week, what about reverting b653db77350c? Why > do we care about the value of ->private for non-PG_private pages? I don't think we do care but based on the changelog of b653db77350c, it's part of an effort to either remove the PG_private bit or is a preparation step for casting page to a meaningful type based on context but only Matthew can tell us his motivation. There at least is some value to identifying cases where a referenced page has valid information in page->private that is not reflected in the flags. -- Mel Gorman SUSE Labs