Received: by 2002:a05:6358:d186:b0:cc:af7:9280 with SMTP id ka6csp20183rwb; Wed, 19 Oct 2022 16:27:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6OM+Jrljv02ll3WLHjr5xLQK2iN7hayA7VjUeeQjClQWdS5u5fNf7eeDFK2V4gdMcqsUCq X-Received: by 2002:a05:6402:1913:b0:45d:fe2:40 with SMTP id e19-20020a056402191300b0045d0fe20040mr9696670edz.353.1666222067395; Wed, 19 Oct 2022 16:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666222067; cv=none; d=google.com; s=arc-20160816; b=ZE9iR3mWYv7cXK6SU9Vpt7Rd5V+YJ7SNdchygMXhWH1+94l7Bfmrgk1F8mv0JjwPYv qPGBPmmH6/BlCby9EbKXWkldrDxgJLtOp/qGwKeDBuJuK8QcbN+Prs7p07fU+s2OlESB J1ekHKZ/HhJ2dx336CXYtXgoh0sdJ8QjLvH7vqIHz7BmRsx7p+HTGV+ntKFv6l06R+YF h6vCW2peC+hPuvxqAofblva2B3Dxcgbo4CEciywrHV6mfSmQUIbQX7w6Hd8orln3Q61U glabGAm6iw0jVJh3C+H2wxAMNVettzZHHtUL88vUbhn4+78aYqQWYRJ5czuziapUQf4G 3dLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=oTKnll5qAfEqL/kTmHzW68SLmbcIKONxvCsQlkSz6Qo=; b=VtZGmcdnYhqXhrQmWiNvkzQcYh2+4dtlCuaARJOUYh+SW26xrkRt/6muVVQPWsZOjU IYaNuRvDZVGlK63jOCNupKJvLXzqZkd8e642BF7+iHAWkzI8lV25nY0VyF+BBDA5reWZ RYo7zpvi1hdKtwipwVE4NBk01t3Oeumd8iclTD8KhfKuBvYRCAdSeRvcL5KChikLZKB3 uqfbeagxXLnaeoQQNcPtMthzJxLFCJ5LPl0pUgyw+Zj0edO0FS/5/NwSgMO7kO+i+/Hw iKiNdtLG1aVUL7tWkmrXH77imF02Sd9rBplLJkRN6bq/ZGFzOwNZmNR9PYBVAjxlFK/8 2cuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=iX+GyCvT; 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 n8-20020a05640205c800b004585e0f44fesi18363255edx.60.2022.10.19.16.27.22; Wed, 19 Oct 2022 16:27:47 -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; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=iX+GyCvT; 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 S231394AbiJSXSO (ORCPT + 99 others); Wed, 19 Oct 2022 19:18:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbiJSXSN (ORCPT ); Wed, 19 Oct 2022 19:18:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A1161AAE46 for ; Wed, 19 Oct 2022 16:18:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 13AF7619D2 for ; Wed, 19 Oct 2022 23:18:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E22FC433D6; Wed, 19 Oct 2022 23:18:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1666221491; bh=PQpDdjCNhgH/SV9g2/UI3EyVE4IUuose3w4ZZPETCZE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iX+GyCvTyHxKlLGc4DPMWUDKazCf8F3gxd4aWuRFaCC1MN6GMNAkS9onWpNJ6+ohV pOJdhmLadfgJXoXOOnkpK39orQ63j/79kuXaiS5rxgCUHlS7u50fw7t6mbOCaw8t+C pRZUpAbckhlnTJzeXvhTqmDdxwYVtf5IBj1z9VuQ= Date: Wed, 19 Oct 2022 16:18:10 -0700 From: Andrew Morton To: Yang Shi Cc: Mel Gorman , Matthew Wilcox , Linux-MM , LKML Subject: Re: [RFC PATCH] mm/huge_memory: Do not clobber swp_entry_t during THP split Message-Id: <20221019161810.7510df1f37658a2b71c5e3a7@linux-foundation.org> In-Reply-To: References: <20221019134156.zjyyn5aownakvztf@techsingularity.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, 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 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. As I asked earlier this week, what about reverting b653db77350c? Why do we care about the value of ->private for non-PG_private pages?