mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gregory Price <gourry@gourry.net>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
	edumazet@google.com,  linux-kernel@vger.kernel.org,
	kernel-team@meta.com, stable@vger.kernel.org, david@kernel.org,
	 ziy@nvidia.com, matthew.brost@intel.com,
	joshua.hahnjy@gmail.com,  rakie.kim@sk.com, byungchul@sk.com,
	ying.huang@linux.alibaba.com,  apopple@nvidia.com,
	syzbot+0dbf6d295b3350944f0b@syzkaller.appspotmail.com
Subject: Re: [PATCH] mm/mempolicy: refcount the weighted interleave state instead of copying it
Date: Mon, 24 Aug 2026 11:09:54 -0400	[thread overview]
Message-ID: <aoxeJmrVAiqOVIE8@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <aou9WUf2qU8UewL7@gourry-fedora-PF4VCD3F>

On Sun, Aug 23, 2026 at 11:52:55PM -0400, Gregory Price wrote:
> 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.
> 

I will update to the new fast srcu mechanism, but it'll prevent
backporting beyond 6.18.

Best to backport the gfp fix and update to srcu in normal cadence.

Will submit separately.

~Gregory

  reply	other threads:[~2026-08-24 15:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 17:04 [PATCH] mm/mempolicy: Fix sleeping allocation in alloc_pages_bulk_weighted_interleave() Eric Dumazet
2026-08-21 17:40 ` Gregory Price
2026-08-21 17:40 ` Andrew Morton
2026-08-21 17:47   ` Gregory Price
2026-08-21 17:59   ` Eric Dumazet
2026-08-23 23:01   ` Gregory Price
2026-08-24  2:41   ` [PATCH] mm/mempolicy: refcount the weighted interleave state instead of copying it Gregory Price
2026-08-24  3:06     ` Matthew Wilcox
2026-08-24  3:52       ` Gregory Price
2026-08-24 15:09         ` Gregory Price [this message]
2026-08-24 18:39     ` Andrew Morton
2026-08-24 10:12 ` [PATCH] mm/mempolicy: Fix sleeping allocation in alloc_pages_bulk_weighted_interleave() David Hildenbrand (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=aoxeJmrVAiqOVIE8@gourry-fedora-PF4VCD3F \
    --to=gourry@gourry.net \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=byungchul@sk.com \
    --cc=david@kernel.org \
    --cc=edumazet@google.com \
    --cc=joshua.hahnjy@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew.brost@intel.com \
    --cc=rakie.kim@sk.com \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+0dbf6d295b3350944f0b@syzkaller.appspotmail.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@linux.alibaba.com \
    --cc=ziy@nvidia.com \
    /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®