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

From: Lorenzo Stoakes (ARM)

Date: Tue Dec 01 2026 - 10:03:54 EST


On Tue, Dec 01, 2026 at 09:51:34AM -0500, Gregory Price (Meta) wrote:
> 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.

I fear the CPU side will be fraught with problems a lot more than the
nodemask, especially given hotplug.

So I think we should be conservative, especially while we are in the midst
of getting 20M AI bug fix reports for everything :))

This nodemask change seems a lot more laser focused so less of a problem
that way (though I stand by my requests re: cover letter detail).

--
Cheers, Lorenzo