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 AD0D1C41513 for ; Mon, 7 Aug 2023 16:43:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 98F1D6B0072; Mon, 7 Aug 2023 12:43:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 93F286B0074; Mon, 7 Aug 2023 12:43:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8066A6B0075; Mon, 7 Aug 2023 12:43:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 709DC6B0072 for ; Mon, 7 Aug 2023 12:43:47 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3B1B61601B3 for ; Mon, 7 Aug 2023 16:43:47 +0000 (UTC) X-FDA: 81097880094.23.A1B0AF3 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf28.hostedemail.com (Postfix) with ESMTP id 4CB6EC0006 for ; Mon, 7 Aug 2023 16:43:45 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=COIfvsny; dmarc=none; spf=pass (imf28.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691426625; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=aANAztN3hjbPULgDteUrENZyGfMQl8tJqwJK/93LN8Y=; b=gzB+FtDbHlx6Ia31Bc9yqgcg82b+C3zvFt3EiH56TxphrVxU9JWd6i+NyN9sQZW8R7ETve 1+bBvnacFBEzFmDkw1SOovaeXNOzRfE7YcAj8SSTQ9w5O2O0G2Skzph6K1yCbB56YuxjyD FeZ44re5tqGCUXlF0aD0PcrED6nnJQM= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=COIfvsny; dmarc=none; spf=pass (imf28.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691426625; a=rsa-sha256; cv=none; b=wFUJadFDpLxJrmNQZNJQ+Ax5ohycKNiJtgKHhaaDapNJv/yZYGjXh20rxZMOC2onlhb9Ql J43r4NhVELzON9lvw1+p9oY9xx1mH27NEl4J739WHEafeurFDfK5geX0ViWlzBdAnPzp75 iXoqDraXDjtopDbFjo+U3HlKIuRRCfE= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2AE6361F68; Mon, 7 Aug 2023 16:43:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28418C433C7; Mon, 7 Aug 2023 16:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1691426623; bh=mC/OCo8hq+diLms6Fsc67TK0qEWRyhhnzPlcu8trSb8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=COIfvsny16WgH9j0mtGIQ5SmK6mHXLjrjumtR4I2MUWJ7RfrVddCiXNFh/BglZOz9 VWXQaqTT0zXnwJnJI4lENI8tGb6YWhf+OseHCQvVMwywv4Ve/ZsCndA88YVv612EE0 Z03tnfzBhKg0C+zjBHnUBZfMsUjll1sJW5Jfvc2Q= Date: Mon, 7 Aug 2023 09:43:42 -0700 From: Andrew Morton To: "Yin, Fengwei" Cc: , , , , , , , , , , Subject: Re: [PATCH 0/2] don't use mapcount() to check large folio sharing Message-Id: <20230807094342.17199a897f51a298f20fda57@linux-foundation.org> In-Reply-To: <6dbf9f37-e4bf-656d-4121-789e2e6cfae2@intel.com> References: <20230728161356.1784568-1-fengwei.yin@intel.com> <20230728102405.7b456eb87fb46042fbce5e4b@linux-foundation.org> <29cd58c4-08d3-c03c-7232-15f85878934d@intel.com> <6dbf9f37-e4bf-656d-4121-789e2e6cfae2@intel.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CB6EC0006 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: g76o6sruch9oep6zppn84de7xos16axq X-HE-Tag: 1691426625-443900 X-HE-Meta: U2FsdGVkX1/xnts9YhtYP45WpZWKo/EAEoXkRHUqJ5rNXL5YiJFcUqhIaBPgGF1V4BLmwzFaNDJQSRr2wemGmONXsNCF+W2LULcY+fqO6b153jYFxdGD83DIRoArah9OYgde1AuXpHYOu0UT5e2X9y7WlBH5YY1UxNpgR5SvJYKcNYWzRhC/Qle8+dJ0r+5Su93S5SwlVkCXmQdaKbJy7ihNQd9yIGY1Vi04d4vbR8tQnPDfQKA5g/cHmd55Et4WDYbl1wyaRTC46u8Va2Cwg45NwTPw6vwTgPztP6dDyWFztzg34yApZBTBtFqlRo4Aqe80sHhYyi59xiEZ+V+RB9mYylDIIObcE/gEiwUvYkk0w8yqoGcrGD0AlmnrswMPwJ4tyCifArANheS4i2HQxNvuVZl6WazbMTlBNB54xcCNKx89JUyPih7Hk5oyiTvU3hct6NLX4fNnbq6T2okIIzHzHmpT2cgRli3r4nmZK5Gy0RQLWI4V9JZj9IO+Wz4GY6ks8hPnIH6xFXGeLFOlHvR8Xg1lvGg1aJB/3Pr6dGbJ/j8A20WoZNgtCWnoHFrM9aNkDSPXUC4WkMviDbT97mP6+dlMlTe6xrxxnRSAjguQl/2wMCQmejBh86M9ELIkwT09hw98u1yoS2nQt7YxcJGVenhXc6TZ0s15yODIXexwlITK5ZNBUG89k2ld8Bjug0CXWWDL7BUc2Lnjwx5l43RhjdG37gfVNeargLQTWz5NBHIa5YUltnWXbZxTnt6UfhLNroVi6aFdKdG9Ez+U1eC41c1jIIe5HDrH5HNXwThoMClbW4lkf9n0hgK5wumOhE72B2kbSMkh74PIWwsXoXCF/qp/riScOWej+yEtS5Tz0M0cgfKzbFB4m1RhclF1KdWH5WAUpITT7dv0G8ZdDl0F9QHGM4dj8tiGva+Snw365Y2pypE8fCuHmketlGNytxksJm1gu+FbOjftZGi iuEdmIQ5 /6StYKsXjQWGq51crsy+cFet8OSgkUzLYJIT748+2WIFVbPF5zArg4/KaIUpFxFHYx4ZwBPIXykjT7vTW4Mjy+0CqBlCazcOT5qCwY/OsT3sqtdXBbgWTf6V+yBgCS5eFz55YIGYjygUiWviJWtDyFrpLKKt3S799L+c2ZBp/menYkrLjL7XoSYoC6pEycBCtfTHLFW7miQ7XOOy6UOcxpS0MKVfSwZmJV54KnrheSIrZR4R7lAouYA8pO1GfQPRcVlHFNpNhDwdMFMUGY1R9syYTtMxuTASJxKlfxhuTwpKSg2d0YiknoazAX6wCQ2RD6lgeka2i/s5V2gxvOtF2IXs1QfzObVSvgt1VtVawN3TUar0embbCzXpZnhfZSlgr31AvoKu1bsO+DFuNFwqcPYkHkDQY4GtEBiwb4zzFJK5aOIw= 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 Fri, 4 Aug 2023 15:14:53 +0800 "Yin, Fengwei" wrote: > Hi Andrew, > > On 8/2/2023 8:39 PM, Yin, Fengwei wrote: > > Hi Andrew, > > > > On 7/29/2023 1:24 AM, Andrew Morton wrote: > >> On Sat, 29 Jul 2023 00:13:54 +0800 Yin Fengwei wrote: > >> > >>> In madvise_cold_or_pageout_pte_range() and madvise_free_pte_range(), > >>> folio_mapcount() is used to check whether the folio is shared. But it's > >>> not correct as folio_mapcount() returns total mapcount of large folio. > >>> > >>> Use folio_estimated_sharers() here as the estimated number is enough. > >> > >> What are the user-visible runtime effects of these changes? > >> > >> (and please try to avoid using the same Subject: for different patches) > >> > > > > Can you hold on these patches to mm-unstable? I think we need to wait for > > David's work on folio_maybe_mapped_shared() and redo the fix base on that. > > Thanks and sorry for the noise. > Sorry for bothering you again for this patchset. > > Let me explain the situation here: > - The reason to hold on the patches to mm-unstable is that I don't want to > promote the fix in this patch (using folio_estimated_sharers()). The > correct way is waiting for folio_maybe_mapped_shared() from David. > > Merging these patches motivate using folio_estimated_sharers() in other > places. So once folio_maybe_mapped_shared() is ready, we need to replace > folio_estimated_sharers() with folio_maybe_mapped_shared(). > > - For this specific patches, if they are suitable for stable, we may want to > merge it (special for stable branch. I assume folio_maybe_mapped_shared() > may not be back ported to stable branch). > > So how do we deal with this situation? Thanks in advance. > I think I'll stage them for 6.5, with a cc:stable. I'll drop the current three patches. Please resend with a) different Subject:s for all patches and b) changelogs which fully describe the user-visible effects of the change. Thanks.