Re: [PATCH x86/mm UPDATED] x86-64, NUMA: Fix distance tablehandling

From: David Rientjes
Date: Thu Mar 03 2011 - 15:07:22 EST


On Wed, 2 Mar 2011, Yinghai Lu wrote:

> david,
>
> it looks like numa emu does not support that conf already.
>
> old code:
> void __cpuinit numa_add_cpu(int cpu)
> {
> unsigned long addr;
> u16 apicid;
> int physnid;
> int nid = NUMA_NO_NODE;
>
> apicid = early_per_cpu(x86_cpu_to_apicid, cpu);
> if (apicid != BAD_APICID)
> nid = apicid_to_node[apicid];
> if (nid == NUMA_NO_NODE)
> nid = early_cpu_to_node(cpu);
> BUG_ON(nid == NUMA_NO_NODE || !node_online(nid));
>

This isn't broken, the node must be online for the cpu to be bound to it.
I'm specifically concerned about the case where the node is offline
because it has no memory mapped to it and all cpus are bound to node 1,
for instance.

The new emulation code needs to remove the assumption that node 0 always
is online and become more robust since there's no such restriction in the
ACPI spec.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/