mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Pranith Kumar <bobby.prani@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Lorenzo Stoakes <ljs@kernel.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>
Subject: Re: [RFC PATCH] mm/rmap: use release ordering for small-folio mapcount removal
Date: Wed, 4 Nov 2026 10:16:03 +0100	[thread overview]
Message-ID: <750560f3-4c5a-44fe-b72a-0611be383f32@kernel.org> (raw)
In-Reply-To: <20261104013139.1341582-1-bobby.prani@gmail.com>

On 11/4/26 02:31, Pranith Kumar wrote:
> Removing a PTE mapping must precede lowering its folio's mapcount.
> The COW path relies on this order to keep the old page from being
> reused while a stale translation can still access it. The mapcount
> update needs release ordering for that edge, rather than the full
> ordering of atomic_add_negative().
> 
> Use atomic_add_negative_release() for non-large folios removed at PTE
> level. Leave large-folio operations fully ordered; their path can
> queue a partially mapped folio for deferred splitting. Update the
> COW ordering comment to describe the required guarantee.
> 
> In an arm64 page map/unmap microbenchmark with 20,480 minor
> faults, simulated cycles fell by 1.54%.

Thanks for the patch.

While I see value, I am not convinced this is the right time for this
micro-optimization while we are busy with other things.

This needs a better evaluation: 1.54% in a micro-benchmark without knowing the
stddev isn't particularly helpful.

-- 
Cheers,

David

  reply	other threads:[~2026-11-04  9:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  1:31 Pranith Kumar
2026-11-04  9:16 ` David Hildenbrand (Arm) [this message]
2026-11-04  9:46   ` Pranith Kumar
2026-11-04 13:37     ` David Hildenbrand (Arm)
2026-11-04 13:55       ` Lorenzo Stoakes (ARM)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=750560f3-4c5a-44fe-b72a-0611be383f32@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=harry@kernel.org \
    --cc=jannh@google.com \
    --cc=lance.yang@linux.dev \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=riel@surriel.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®