[PATCH] mm: slab cache interleave rotor fix
authorPaul Jackson <pj@sgi.com>
Wed, 22 Mar 2006 08:09:11 +0000 (00:09 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 22 Mar 2006 15:54:06 +0000 (07:54 -0800)
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>
mm/slab.c

index 6b691ecbac44916d48a45c5e99505a38e7dff171..1c8f5ee230d5dfeaf59fdcf5a1b6334cfa5f3691 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -830,7 +830,7 @@ static void init_reap_node(int cpu)
 
        node = next_node(cpu_to_node(cpu), node_online_map);
        if (node == MAX_NUMNODES)
-               node = 0;
+               node = first_node(node_online_map);
 
        __get_cpu_var(reap_node) = node;
 }