Re: [GIT PULL] bitmap changes for v6.0-rc1

From: Linus Torvalds
Date: Mon Oct 10 2022 - 17:19:11 EST


On Mon, Oct 10, 2022 at 2:12 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Sun, Oct 2, 2022 at 7:03 PM Yury Norov <yury.norov@xxxxxxxxx> wrote:
> >
> > lib/cpumask: add FORCE_NR_CPUS config option
>
> Side note: I think we should make this option depend on EXPERT.

Oh, and if a constant 'nr_cpu_ids' is such an important thing from a
code generation standpoint, maybe we'd be better off saying 'for small
NR_CPUS, just make nr_cpu_ids be that small constant".

Rather than confusing people with a question that is a bit strange.
Afaik, all our kernel code has to work with "nr_cpu_id's doesn't match
the number of CPU's we actually have", because of cpu hotplug (and
suspend/resume) issues anyway.

So I _think_ all the nr_cpu_id's games are mainly because we don't
want to allocate huge arrays when you can't actually have that many
CPU's - but for a small NR_CPUS situation that just isn't an issue
anyway.

Yes? No?

Linus