Comment 1 for bug 706058

Revision history for this message
Tim Gardner (timg-tpi) wrote :

SRU Justification

Impact: Servers with more then 64 logical CPUs cannot boot.

Patch Description: Increase CONFIG_NR_CPUS to 256 for the amd64 server flavour

The CPU hotplug subsytem allocates memory using the per-cpu mechanism. Enough memory is pre-defined by CONFIG_NR_CPUS to accommodate the maximum number of CPUs that can be online. This value is discovered at boot time and is used to trim the actual memory allocated to the real number of CPUs. In effect, CONFIG_NR_CPUS has little impact on memory consumption except for these 9 vairables:

kernel/cpu.c:static DECLARE_BITMAP(cpu_possible_bits, CONFIG_NR_CPUS) __read_mostly
kernel/cpu.c:static DECLARE_BITMAP(cpu_possible_bits, CONFIG_NR_CPUS) __read_mostly;
kernel/cpu.c:static DECLARE_BITMAP(cpu_online_bits, CONFIG_NR_CPUS) __read_mostly;
kernel/cpu.c:static DECLARE_BITMAP(cpu_present_bits, CONFIG_NR_CPUS) __read_mostly;
kernel/cpu.c:static DECLARE_BITMAP(cpu_active_bits, CONFIG_NR_CPUS) __read_mostly;
kernel/sched.c: DECLARE_BITMAP(cpus, CONFIG_NR_CPUS);
kernel/sched.c: DECLARE_BITMAP(span, CONFIG_NR_CPUS);
kernel/sched.c: static DECLARE_BITMAP(tmpmask, CONFIG_NR_CPUS);
mm/slub.c:static DECLARE_BITMAP(kmem_cach_cpu_free_init_once, CONFIG_NR_CPUS);

The increase in memory size of these variables is negligible since they are bit map structures. For example, increasing from 64 to 256 only adds 24 bytes per variable.