Skip to contentSkip to conversation

mm: slab cache interleave rotor fix

PATCH In review Paul Jackson 2 participants 2 messages Mar 19, 2006 – Mar 20, 2006 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: slab cache interleave rotor fix

From: Paul Jackson <[email protected]>

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.

---

 mm/slab.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
mm/slab.c +1 -1
@@ -835,7 +835,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;
 }
Signature · 3 lines
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <[email protected]> 1.650.933.1373