Re: [PATCH] mm/mempolicy: Fix sleeping allocation in alloc_pages_bulk_weighted_interleave()
From: Gregory Price
Date: Fri Aug 21 2026 - 13:47:43 EST
On Fri, Aug 21, 2026 at 10:40:43AM -0700, Andrew Morton wrote:
> On Fri, 21 Aug 2026 17:04:07 +0000 Eric Dumazet <edumazet@xxxxxxxxxx> 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