Skip to contentSkip to conversation

<PING> Re: [patch x86/core] x86: allow number of additional hotplug CPUs to be set at compile time

DISCUSSION Bodo Eggert 2 participants 2 messages Oct 6, 2008 15 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw
Quoted 6 lines · Andi Kleen

additional_cpus is used to tell Linux that there are more (or less) CPUs hotpluggable than the BIOS declares at boot time. This is needed because the way the BIOS is declaring it is a Linux extension, not standard. But even if it was standard it would be good policy to be able to override it because as we all know BIOS can be wrong, as in declare far too many.

I don't have a machine with pluggable CPUs, but I'd imagine if you'd take out some CPUs, the number of additional CPUs you can plug in will increase by the same number (forcing me to change the kernel command lince if I do), while the number of slots (and the number of possible CPUs) stays the same unless somebody offers a new kind of CPU card. Therefore, I'd expect "maxcpus=" to be the only interface I want for this purpose. Put in a value bigger than the amount plugged in -> voila.

OTOH, looking at Thomas' patch, I'd guess it would not work as expected ... and looking at the code seems to confirm this. Besides that, I'd possibly want a way to limit the number of online CPUs at boot saying something like "onlinecpus=", which would not limit the number of CPUs I can plug in.

#16 lore raw
Quoted 3 lines · Bodo Eggert

I don't have a machine with pluggable CPUs, but I'd imagine if you'd take out some CPUs, the number of additional CPUs you can plug in will increase by the same number (forcing me to change the kernel command lince if I do), while the

It only costs you some memory to have more hotpluggable CPUs (on my kernel here around 40k/possible CPU), so there's very little "force" in practice unless you set excessive values.

Some other architectures invented a "possible_cpus=..." parameter to address this. I presume this could be done on x86 too, but it doesn't seem like a very pressing issue. Even if it was done it would be better to keep additional_cpus for compatibility.

Quoted 4 lines

number of slots (and the number of possible CPUs) stays the same unless somebody offers a new kind of CPU card. Therefore, I'd expect "maxcpus=" to be the only interface I want for this purpose. Put in a value bigger than the amount plugged in -> voila.

maxcpus=... doesn't affect the cpu_possible_mask. It really is only good for limiting CPUs.

Quoted 4 lines

OTOH, looking at Thomas' patch, I'd guess it would not work as expected ... and looking at the code seems to confirm this. Besides that, I'd possibly want a way to limit the number of online CPUs at boot saying something like "onlinecpus=", which would not limit the number of CPUs I can plug in.

That is exactly what maxcpus=... does.

Anyways I don't see the additional_cpus=... removal patch in tip so hopefully things are fine now

-Andi

Signature · 1 line
[email protected]