Просмотр исходного кода

[PATCH] mm: slab cache interleave rotor fix

The alien cache rotor in mm/slab.c assumes that the first online node is
node 0.  Eventually for some archs, especially with hotplug, this will no
longer be true.

Fix the interleave rotor to handle the general case of node numbering.

Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Jackson 20 лет назад
Родитель
Сommit
442295c94b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      mm/slab.c

+ 1 - 1
mm/slab.c

@@ -830,7 +830,7 @@ static void init_reap_node(int cpu)
 
 
 	node = next_node(cpu_to_node(cpu), node_online_map);
 	node = next_node(cpu_to_node(cpu), node_online_map);
 	if (node == MAX_NUMNODES)
 	if (node == MAX_NUMNODES)
-		node = 0;
+		node = first_node(node_online_map);
 
 
 	__get_cpu_var(reap_node) = node;
 	__get_cpu_var(reap_node) = node;
 }
 }