On 12.12.23 11:10, Julien Grall wrote:
Hi Juergen,

On 12/12/2023 09:47, Juergen Gross wrote:
Allow 16 bits per cpu number, which is the limit imposed by
spinlock_tickets_t.

This will allow up to 65535 cpus, while increasing only the size of
recursive spinlocks in debug builds from 8 to 12 bytes.
Looking at arch/Kconfig, it looks like we are limiting NR_CPUS to maximum 4096. So can you outline why we need this?

The limit of 4096 cpus is dictated by the current limit of the spinlock
implementation. So asking "why do we need to support more than 4096 cpus
in spinlock_t when the current Xen limit is 4096" is kind of the wrong
question.

The correct question would be: why is Xen limited to 4096 cpus? Answer:
because of the limit in spinlock_t.

There are (x86) machines out there with more cpus than 4096, and Javi (added
to Cc:) was already looking into rising the Xen limit.


Just to be clear is I am not against this change, but alone it seems a little bit odd to increase the size in debug when that limit can never be reached (at least today).


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to