Skip to content

Commit

Permalink
Revert "x86, NUMA: Fix fakenuma boot failure"
Browse files Browse the repository at this point in the history
Andreas Herrmann reported that 7d6b467 ("x86, NUMA: Fix fakenuma
boot failure") causes certain physical NUMA topologies (for example
AMD Magny-Cours) to move sibling cpus to a single node when in reality
they are in separate domains.

This may result in some nodes being completely void of cpus, which
doesn't accurately represent the correct topology. The system will
boot, but will have suboptimal NUMA performance.

This commit was intended as a fix for NUMA emulation, but should
not cause a regression for real NUMA machines as a side effect.

( There will be a separate fix for the numa-debug code, which
  will not affect physical topologies. )

Reported-by: Andreas Herrmann <herrmann.der.user@googlemail.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.00.1104201918110.12634@chino.kir.corp.google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
David Rientjes authored and Ingo Molnar committed Apr 21, 2011
1 parent 584f790 commit 37f8527
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,26 +312,6 @@ void __cpuinit smp_store_cpu_info(int id)
identify_secondary_cpu(c);
}

static void __cpuinit check_cpu_siblings_on_same_node(int cpu1, int cpu2)
{
int node1 = early_cpu_to_node(cpu1);
int node2 = early_cpu_to_node(cpu2);

/*
* Our CPU scheduler assumes all logical cpus in the same physical cpu
* share the same node. But, buggy ACPI or NUMA emulation might assign
* them to different node. Fix it.
*/
if (node1 != node2) {
pr_warning("CPU %d in node %d and CPU %d in node %d are in the same physical CPU. forcing same node %d\n",
cpu1, node1, cpu2, node2, node2);

numa_remove_cpu(cpu1);
numa_set_node(cpu1, node2);
numa_add_cpu(cpu1);
}
}

static void __cpuinit link_thread_siblings(int cpu1, int cpu2)
{
cpumask_set_cpu(cpu1, cpu_sibling_mask(cpu2));
Expand All @@ -340,7 +320,6 @@ static void __cpuinit link_thread_siblings(int cpu1, int cpu2)
cpumask_set_cpu(cpu2, cpu_core_mask(cpu1));
cpumask_set_cpu(cpu1, cpu_llc_shared_mask(cpu2));
cpumask_set_cpu(cpu2, cpu_llc_shared_mask(cpu1));
check_cpu_siblings_on_same_node(cpu1, cpu2);
}


Expand Down Expand Up @@ -382,12 +361,10 @@ void __cpuinit set_cpu_sibling_map(int cpu)
per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) {
cpumask_set_cpu(i, cpu_llc_shared_mask(cpu));
cpumask_set_cpu(cpu, cpu_llc_shared_mask(i));
check_cpu_siblings_on_same_node(cpu, i);
}
if (c->phys_proc_id == cpu_data(i).phys_proc_id) {
cpumask_set_cpu(i, cpu_core_mask(cpu));
cpumask_set_cpu(cpu, cpu_core_mask(i));
check_cpu_siblings_on_same_node(cpu, i);
/*
* Does this new cpu bringup a new core?
*/
Expand Down

0 comments on commit 37f8527

Please sign in to comment.