🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #11095

Re: [RFC PATCH] mm/rmap: use release ordering for small-folio mapcount removal

#11095
From: "Lorenzo Stoakes (ARM)"
Date: Wed, 04 Nov 2026 17:15
44 lines
10110 bytes
On Wed, Nov 04, 2026 at 05:08:10PM +0000, Pedro Falcato wrote:
> On Wed, Nov 04, 2026 at 08:51:20AM -0800, Pranith Kumar wrote:
> > Hi Lorenzo,
> >
> > On Wed, Nov 4, 2026 at 5:55 AM Lorenzo Stoakes (ARM) <ljs@kernel.org> wrote:
> > >
> > > On Wed, Nov 04, 2026 at 02:37:39PM +0100, David Hildenbrand (Arm) wrote:
> > >
> > > I mean 1.54%, theoretically is even less convincing for me :)
> >
> > With reducing the strength of one barrier, I think this is a non-trivial gain.
>
> Counting cycles on an arm64 simulator for a microbenchmark is completely
> unconvincing.

Exactly.

>
> > >
> > > In any case for something touching a sensitive memory barrier operation to have
> > > a stronger argument put forward for release ordering being suitable than simply
> > > stating it's fine in the commit message and updating a comment.
> > >
> >
> > Can you please explain what information is missing? I think the commit

All of it? Your commit message simply asserts that this is true.

> > message has all the details of why release is sufficient instead of
> > full barrier.
>
> rmap is gnarly code and I'm not sure people have an appetite towards weakening
> random atomic ordering semantics for a virtual 1.54% cycles gain in some
> microbenchmark, without actually explaining why it is safe. __folio_remove_rmap()
> has (indirectly) a lot of callers which may subtly expect different semantics.

Exactly. And this patch boldly decides to CHANGE the invariant here without
evidence for a theorised perf gain.

Sorry we don't have time for this. NAK.

--
Cheers, Lorenzo
Technical Details
Message-ID: <autmnQwhDvMzqY5E@gremlin>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356624-linux-kernel-netdev=dewy.ru
References: <20261104013139.1341582-1-bobby.prani@gmail.com> <750560f3-4c5a-44fe-b72a-0611be383f32@kernel.org> <CAJhHMCCu8ehOU37_4UpExNO3U8YPygjnht+2S+axkxTwY8bx2w@mail.gmail.com> <287698ab-76dc-4aee-8e6c-db1f5d18974c@kernel.org> <aus4ag1KxpuBNSP1@gremlin> <CAJhHMCChBTH3QWBFS1Hp17zj5HepN6KFucvG_5tVdpaB4fjCYg@mail.gmail.com> <autkT1eNM7-oSM4F@pedro-suse.tail5790ac.ts.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-356624-linux-kernel-netdev=dewy.ru
From: ljs@kernel.org ("Lorenzo Stoakes (ARM)")
Newsgroups: linux.kernel.netdev
Subject: Re: [RFC PATCH] mm/rmap: use release ordering for small-folio
 mapcount removal
Date: Wed, 4 Nov 2026 17:15:10 +0000
Organization: Usenet Network
Message-ID: <autmnQwhDvMzqY5E@gremlin>
References: <20261104013139.1341582-1-bobby.prani@gmail.com>
 <750560f3-4c5a-44fe-b72a-0611be383f32@kernel.org>
 <CAJhHMCCu8ehOU37_4UpExNO3U8YPygjnht+2S+axkxTwY8bx2w@mail.gmail.com>
 <287698ab-76dc-4aee-8e6c-db1f5d18974c@kernel.org>
 <aus4ag1KxpuBNSP1@gremlin>
 <CAJhHMCChBTH3QWBFS1Hp17zj5HepN6KFucvG_5tVdpaB4fjCYg@mail.gmail.com>
 <autkT1eNM7-oSM4F@pedro-suse.tail5790ac.ts.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3438232"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:/AHHjx4uqlwuTAtcXJbjgBwftZg= sha256:sTF1lg01nrgoNkx93RKtRJyJ4pnLYXSYu7HXVXWGOH0=
	sha1:3ERBi7nbnpYyTFWPqmhoyNagg4Q= sha256:bYR3SXQsGQwqI8nun4Dudfg50ZxriHu7++knuBfRAig=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id E5AFC112C7C; Wed,  4 Nov 2026 20:21:14 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.501
X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id AQX3DmKKe5e2;
	Wed,  4 Nov 2026 20:21:12 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-356624-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id E813F112C66; Wed,  4 Nov 2026 20:21:03 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 4B0D5609BB6; Wed,  4 Nov 2026 17:15:33 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793812524;
	b=Occbg0UAQcdp5ijMRUScQuqZbxf6JdJ1chGOHPXb+2FdY51/Gibd9XARd2SVeXlOQ5Pm
	 Lek1AOQemo30RtHot57C9KzdctBP56zymFEcNJKpgpmVgc4gVjHfOprV+rt/2kyPHdWv2
	 /f+26TEvVWqY4+zBl/Q/XQ80b5y4eHBKVQzwaZCik/ENUGnzWxn4FJFeZNzjTWHGIHl+s
	 qVYrHixmtwgI/FfHvP/oXtexvZbJiqgJwBCm6K04+KdutnAIOy1r8t0B72kzUdhoeuoN+
	 QR20cl6BndRG2gaLxyRzVBJ4VzWULaa8QUumaBAuLw7QUwt+7xn80E8OAn3IsJVs1mA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793812524;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:
	 Content-Transfer-Encoding:In-Reply-To;
	bh=SYq9+BBr0q0gADHtUh7wcOV25vq3s2GgCZsPxG2VA6Q=;
	b=z8GBO2wDzeCFKLfqM6ZSVbpdlmXufqvkURt4GPFjkWCoZSUDKF89hAQQR07KHw4nCCi4
	 r5V5HIbzZjKxWgdb0aF56H4RqAE7R4LFuoMCGp9t/j7aJDmlIStxC8G7f5YvErbUDcNw9
	 qylcm0dADzZcV04RDBQDZo4vXdIbgoQOeTX5z4p97m+0EF/lvi5hHlf+ZKrd5pNj6VjO/
	 LvdXv182MLYPrVxxte+Mxu7rDFzxOEeJeWeYdNJdsqs0JQZ0/oQUHU2a9OXITF9FCob9n
	 k10UqSEpeLC6adLEMJ2/dGwQEaeBAxcLixvOAL76htKVXgL2Uo6tI5ByAUHIMzGtI/w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="h/WBm7u6";
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 1811F606D813;
	Wed,  4 Nov 2026 17:15:24 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=h/WBm7u6
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793812518;
	b=ySjwhkdnHE/CYa28yUoSbg3j9Ik9Kp1v/4y/NIFlHIVEbD/55EScWCPlA1ftCPAPIfdN
	 nGPekiabNJpSHP2ojAuJ1nz7DwYgZzHiX+JsxQfEtWOFWPKpxtmtdmay74Uip1BcEm92e
	 FNTRrhLqfA5P47gQWplw+ujbJBonR77ReF2qW/Q3AggyCMLzRJE7A5A9fg2Q7Xdd+py+z
	 u21oVR268kZZq+oFElJ7oUUv4Inqx7K42O6gTw6u1txLA5dbDlcJUeov095tNIh0MGp6/
	 /ed6zjjNY3t8aJSN1RxPA2kxk0qms4rDJUIgy20ehCu+WMf5WQa46hk0dIJn6FwxKXA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793812518;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:
	 Content-Transfer-Encoding:In-Reply-To;
	bh=SYq9+BBr0q0gADHtUh7wcOV25vq3s2GgCZsPxG2VA6Q=;
	b=WU62wsbLFGbPE3+qdME1HDvH3wqnmvMpvevFoKHY0W388CpuiWXBdJUqa97g1fO8OC8T
	 za87GaSCXItS92qFWFulPwUP3l83VslavhbGGCgKGC7vCEZZ38Dcspt2W3mCqmgOoxm8c
	 e342uZTiWeoIWjPuDFrp4NiQy7+mXXRWfut6SwKYLDGt+qwH9p1JX6QgRiHC83ANj/6EJ
	 yNv1OvhVvW1c0VjQXTi9SwH5gFJ5kPzXDR3Nn/KaZzfKgzNxRKsJMWM8bc6yS0ic136Sq
	 KHbN7cO8ye4Aiw6zM4NOsuL5xjYPe3hN1JAB9OnBkvTveZhiHUHKHkwEkG5pm844kvA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="h/WBm7u6";
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1E40606A32F;
	Wed,  4 Nov 2026 17:15:17 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B3671F00919;
	Wed,  4 Nov 2026 17:15:13 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793812517;
	bh=SYq9+BBr0q0gADHtUh7wcOV25vq3s2GgCZsPxG2VA6Q=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To;
	b=h/WBm7u6jgGnIGCnazSx+mTpGGIdY44Edu9dfObP1hyHC87oXtWB0MMAm4MFUJJ/u
	 lBTy/MMP0imnbuTtYVYfUthcWkCCJps5xV7IEhakoied3Y/YAYJ2LCW19zBAqJx4pH
	 sESid7Gte1+yneVlzgi9FxomuyS5X741ccgnYFFmh/GqG+xRbGnDTzIU15SABc9zUT
	 En1QWKFCENGlbrm4Vqm2JURpdLhBKzYNmXQLpTfEcInf5v26cvGepdDB33FjMahU29
	 zYFvvfTS0M08OkXL5giLs6Lh5R2qjGs5WvxH+v452VLnqRD8w0FarnxUqHIsZr2Eln
	 lZUSab8BSMMHg==
X-Cc: Pranith Kumar <bobby.prani@gmail.com>, 
	"David Hildenbrand (Arm)" <david@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, 
	"Liam R. Howlett" <liam@infradead.org>, Vlastimil Babka <vbabka@kernel.org>, 
	Mike Rapoport <rppt@kernel.org>, Suren Baghdasaryan <surenb@google.com>, 
	Michal Hocko <mhocko@suse.com>, Rik van Riel <riel@surriel.com>, Harry Yoo <harry@kernel.org>, 
	Jann Horn <jannh@google.com>, Lance Yang <lance.yang@linux.dev>, 
	Richard Cochran <richardcochran@gmail.com>, "open list:MEMORY MANAGEMENT - CORE" <linux-mm@kvack.org>, 
	open list <linux-kernel@vger.kernel.org>, 
	"open list:PTP HARDWARE CLOCK SUPPORT:Keyword:(?:b|_)ptp(?:b|_)" <netdev@vger.kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <autkT1eNM7-oSM4F@pedro-suse.tail5790ac.ts.net>