Re: [PATCH 2/2] x86/numa: instance all parsed numa node

From: Thomas Gleixner
Date: Wed Jul 10 2019 - 07:40:05 EST


On Wed, 10 Jul 2019, Pingfan Liu wrote:
> On Tue, Jul 9, 2019 at 9:34 PM Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
> >
> > Go for it. Iâm not familiar enough with the SMP boot stuff that I would
> > be able to do it any faster than you. Iâll gladly help review it.
>
> I had sent out a patch to fix maxcpus "[PATCH] smp: force all cpu to
> boot once under maxcpus option"
>
> But for the case of nrcpus, I think things will not be so easy due to
> percpu area, and I think it may take a quite different way.

No.

It's the same problem and it's broken in the same way as maxcpus on x86. So
nr_cpus on x86 has to do:

if (nr_cpus < num_present_cpus()) {
pr_info(....);
max_cpus = nr_cpus;
nr_cpus = num_present_cpus();
}

or something like that.

Stop making extra cases which are pointlessly different. X86 boot is a
trainwreck in hardware, so no magic software can fix it.

All you can do is pray that it reaches the point where all present CPUs
have been at least minimaly initialized.

Thanks,

tglx