sched/numa: Fix the new NUMA topology bits
authorPeter Zijlstra <[email protected]>
Thu, 10 May 2012 22:56:20 +0000 (00:56 +0200)
committerIngo Molnar <[email protected]>
Mon, 14 May 2012 13:05:25 +0000 (15:05 +0200)
There's no need to convert a node number to a node number by
pretending its a cpu number..

Reported-by: Yinghai Lu <[email protected]>
Reported-and-Tested-by: Greg Pearson <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
kernel/sched/core.c

index b4f2096980a39d0f2d0ef8e8d7237ceabffa8065..0738036fa569b576eb6dcaa4cf401f2252d2ac36 100644 (file)
@@ -6395,8 +6395,7 @@ static void sched_init_numa(void)
                        sched_domains_numa_masks[i][j] = mask;
 
                        for (k = 0; k < nr_node_ids; k++) {
-                               if (node_distance(cpu_to_node(j), k) >
-                                               sched_domains_numa_distance[i])
+                               if (node_distance(j, k) > sched_domains_numa_distance[i])
                                        continue;
 
                                cpumask_or(mask, mask, cpumask_of_node(k));