diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-07-19 15:46:51 +0100 |
---|---|---|
committer | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-07-19 15:46:51 +0100 |
commit | d6644aa7b8340d7a9189829e59b9ad887f316255 (patch) | |
tree | 420f51a4296d1fdbbffe42a5ccaf186447481816 /xen/arch/x86/setup.c | |
parent | d4619ab51e267a7b7587369b6593062349ecde9c (diff) | |
download | xen-d6644aa7b8340d7a9189829e59b9ad887f316255.tar.gz xen-d6644aa7b8340d7a9189829e59b9ad887f316255.tar.bz2 xen-d6644aa7b8340d7a9189829e59b9ad887f316255.zip |
x86/numa: Correct assumption that each NUMA node has memory
It is now quite easy to buy servers with incorrectly populated DIMMs,
especially with AMD Magny-Cours and Interlagos systems which have two
NUMA nodes per socket.
Currently, Xen will assign all CPUs on nodes without memory to node 0,
which leads to interestingly wrong NUMA information, causing numa
aware functionality such as alloc_domheap_pages() to get things very
wrong.
This patch splits the current logic to accept NUMA nodes without
memory, which corrects the accounting of CPUs to online NUMA nodes.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/setup.c')
-rw-r--r-- | xen/arch/x86/setup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 40276b0c45..3024fec8fd 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -195,8 +195,10 @@ void __devinit srat_detect_node(int cpu) u32 apicid = x86_cpu_to_apicid[cpu]; node = apicid_to_node[apicid]; - if ( node == NUMA_NO_NODE || !node_online(node) ) + if ( node == NUMA_NO_NODE ) node = 0; + + node_set_online(node); numa_set_node(cpu, node); if ( opt_cpu_info && acpi_numa > 0 ) |