Re: nr_cpu_ids vs AMD 3970x(32 physical CPUs)

From: Gabriel C
Date: Fri Jul 03 2020 - 14:36:35 EST


Am Fr., 3. Juli 2020 um 19:45 Uhr schrieb Peter Zijlstra <peterz@xxxxxxxxxxxxx>:
>
> On Fri, Jul 03, 2020 at 07:07:39PM +0200, Gabriel C wrote:
>
> > I boot all the boxes restricting the cores to the correct count on the
> > command line.
>
> This, because you're right about the wasted memory.
>
> > Wasted resource or not, this is still a bug IMO.
>
> Yeah, but not one we can do much about I think. It is the BIOS saying it
> wants more because it expects someone to come along and stick another
> CPU in.
>
> Possible we could say that for single socket machines overprovisioning
> is 'silly', but then, I've no idea how to detect that. You'll need to
> find an ACPI person.

I know the EPYC box got that problem too initially, it reported twice
the cores and twice the sockets,
but got fixed in some kernel versions.

https://lkml.org/lkml/2018/5/20/102

I never really looked at how this is calculated but I still believe
there is a bug somewhere.