Fix two issues in the patch suggested by Kiran: 1. next_node cannot return a node number >MAX_NUMNODES. So use == 2. Node online map should not be empty during bootup so we can skip the code that I added to deal with that situation. Signed-off-by: Christoph Lameter Index: linux-2.6.16-rc4/mm/slab.c =================================================================== --- linux-2.6.16-rc4.orig/mm/slab.c 2006-02-23 10:20:16.000000000 -0800 +++ linux-2.6.16-rc4/mm/slab.c 2006-02-23 13:28:34.000000000 -0800 @@ -803,7 +803,7 @@ static void init_reap_node(int cpu) int node; node = next_node(cpu_to_node(cpu), node_online_map); - if (node >= MAX_NUMNODES) + if (node == MAX_NUMNODES) node = 0; __get_cpu_var(reap_node) = node; @@ -820,15 +820,8 @@ static void next_reap_node(void) drain_node_pages(node); node = next_node(node, node_online_map); - if (unlikely(node >= MAX_NUMNODES)) { + if (unlikely(node >= MAX_NUMNODES)) node = first_node(node_online_map); - /* - * If the node_online_map is empty (early boot) then - * only use node zero. - */ - if (node >= MAX_NUMNODES) - node = 0; - } __get_cpu_var(reap_node) = node; }