Re: [RFC PATCH] futex: Dynamically allocate futex_queues depending on nr_node_ids

From: Sebastian Andrzej Siewior

Date: Fri Feb 27 2026 - 10:21:32 EST


On 2026-02-27 14:17:31 [+0530], K Prateek Nayak wrote:
> Hey Sebastian,
Hi Prateek,

> Sorry for the delay!
No worries.

> On 2/25/2026 2:52 PM, Sebastian Andrzej Siewior wrote:
> > Sounds like it. What would be sane default upper limit then? Something
> > like 1024 CPUs? 2048? Or even more than that?
>
> I feel the current default for NR_CPUS can be be retained as is just to
> be on the safer side.
>
> Turns out QEMU allows for a ridiculous amount of vCPUs per guest and I've
> found enough evidence of extremely large guests running oversubscribed
> that sometimes run distro kernels :-(

You mean distro kernel in 8k CPUs guest? I do this kind of things for
testing but not with a distro kernel. Oh well.

> I'll let you decide what is a good trade off between space saving and
> future headaches :-)

So you are saying NODES_SHIFT=8 and NR_CPUS=4k is what should be default
given "sane" upper limits as of today? I did hope for SHIFT 6 & NR=2k.
Not sure this is worth fighting for.

Thank you.

Sebastian