Re: [PATCH 00/11] nodemask: switch to runtime nr_node_ids

From: Gregory Price (Meta)

Date: Tue Dec 01 2026 - 09:52:27 EST


On 2026-11-28 20:20 -0800, Andrew Morton wrote:
> On Sat, 28 Nov 2026 22:01:46 -0500 Yury Norov <ynorov@xxxxxxxxxx> wrote:
>
> > I would suggest another experiment. Let's on the system boot print a
> > message like:
> >
> > The kernel is configured to support for up to 1024 NUMA nodes, while
> > the actual number of nodes on this system is 2. This leaves 99.8% of
> > the allocated resources unused. Please consider reconfiguring.
> >
> > We can show it, say, at 90% rate or higher, and wait until this will start
> > showing up in the people's boot logs. :)
>
> I love it - you're a troll after my own heart.
>
> I guess we could try it as a standalone thing with lots of convincing
> justifications. Are you able to estimate the cost of these wasted
> resources?
>
> otoh, I'm sure our downstream have considered all this and have good
> reasons for these configurations so we should find out what those
> reasons are before adding shouty things to dmesg,
>

the cpu bitmask has implications for whether the masks live on or
off the stack, so minimizing it is nice but it seems most everyone
bit that bullet a long time ago.

We (Meta) recently ran into this because we *hadn't* converted to
using 8192 until more recently. I think everyone just shipped 8192
to avoid "I bought a random box with +1 cpu and linux exploded".

The nodemask is a bit less of an issue because it's already limited
to 1024, but you'll find the use of SCRATCH increasing as more node
work gets done - which is probably an indication of a bad pattern.

That said, I found two issues that sashiko didn't and it wasn't
all that hard to see them. I suspect there are other silent changes
that this makes which aren't obvious.

--
~Gregory