Anthony Liguori wrote:
+ if (i == numnumanodes) {
+ for (i = 0; i < smp_cpus; i++)
+ node_to_cpus[i % numnumanodes] |= 1<<i;
The way CPUs are allocate here seems strange? Each CPU is assigned
round robin? Should you have node 0 contain 1..X, node 1 contain
X..Y, node 2 contain Y..smp_cpus?
This is because an algorithm to do it this way is more complicated
than this round-robin scheme (imagine distributing 8 CPUs over 3
nodes). Actually I know machines which do this natively (probably for
the same reason, code simplicity in the BIOS). OSes can cope with my
variant too, there is no guarantee that sequentially numbered CPUs
belong to one node.
But if you insist, I fix it.