I was browsing the Linux kernel code these days and I was hit by many questions about the possible number of CPUs supported by the kernel.
As I understand, the kernel, according to the arch, can handle a certain number of CPUs. This number is specified in the Kconfig file and is passed to the CONFIG_NR_CPUS option.
Here is my dmesg output:
setup_percpu: NR_CPUS:5120 nr_cpumask_bits:240 nr_cpu_ids:240 nr_node_ids:1
RCU restricting CPUs from NR_CPUS=5120 to nr_cpu_ids=240
My questions are:
NR_CPUSis this large ?
where does the 240
nr_cpu_idscome from ?
Many thanks for your help