Comment 5 for bug 1582776

Revision history for this message
Stefan Bader (smb) wrote :

I wonder how AWS manages to get that odd (literally) number of CPUs. From the dmesg:

smpboot: Allowing 15 CPUs, 13 hotplug CPUs

From that it looks like possible=15 and num_processors=2 in prefill_possible_,map(). And possible is assigned to nr_cpu_ids after printing the line above. Confirmed in dmesg a little down:

setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:15 nr_node_ids:1

The divide error is in smp_init_package_map() which is inlined from smp_store_boot_cpu_info(). This would print "Max logical packages: ..." at some point which is not in dmesg. The only places there that look like they could cause a divide by 0 would be using ncpus. The first instance here:

ncpus = boot_cpu_data.x86_max_cores;
__max_logical_packages = DIV_ROUND_UP(total_cpus, ncpus);

Have not yet dug down into where x86_max_cores gets set.