Re: [PATCH] mm/mempolicy: Fix sleeping allocation in alloc_pages_bulk_weighted_interleave()

Gregory Price <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.mm
Message-ID <aoiONiqcPJG11J88@gourry-fedora-PF4VCD3F>
On Fri, Aug 21, 2026 at 10:40:43AM -0700, Andrew Morton wrote:
> On Fri, 21 Aug 2026 17:04:07 +0000 Eric Dumazet <[email protected]> wrote:
> 
> I wonder if we *really* need the local copy of state->iw_table. 
> Perhaps with appropriate care we can directly use state->iw_table in
> here.
> 
> How much would it hurt to expand the rcu_read_lock() coverage?
> 
> A local array of MAX_NUMNODES bytes isn't attractive - 1k of stack.
> 
> A spinlock-protected static array would work, if super-rare slowpath.
> 

I would need to go back through the original thread when i authored
this, but I think this is possible.  I will add it to my backlog to
investigate.

Weight updates should be *extraordinarily* rare, unless someone is doing
dynamic runtime twiddling of the sysfs values and thinks that's somehow
a good idea (or expecting them to be timely).

~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.