Re: [PATCH] mm/mempolicy: refcount the weighted interleave state instead of copying it

Gregory Price <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.kernel.vger.stable,org.kvack.linux-mm
Message-ID <aou9WUf2qU8UewL7@gourry-fedora-PF4VCD3F>
On Mon, Aug 24, 2026 at 04:06:03AM +0100, Matthew Wilcox wrote:
> On Sun, Aug 23, 2026 at 10:41:17PM -0400, Gregory Price wrote:
> 
> Bit of a shame to take/put a refcount on every memory allocation.  That
> seems like it might hurt (even being on a different cacheline).  Would
> it make more sense to use SRCU for this?

Bulk allocation - from some measurements it's about once per 100-pages
on average.  Looking back at the data I was getting about 41 refs per
4096 pages (16MB chunks).

Have to imagine there's other cache fighting in that stack too. 

I'm less familiar with the rules around SRCU so i shied away from it,
but I will take a look.

~Gregory
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.