Signed-off-by: Alok N Kataria Index: linux-2.6.13/mm/slab.c =================================================================== --- linux-2.6.13.orig/mm/slab.c 2005-09-13 20:56:33.040284000 +0530 +++ linux-2.6.13/mm/slab.c 2005-09-20 13:22:08.328464250 +0530 @@ -3273,7 +3273,7 @@ list_for_each(walk, &cache_chain) { kmem_cache_t *searchp; struct list_head* p; - int tofree; + int tofree, nodeid; struct slab *slabp; searchp = list_entry(walk, kmem_cache_t, next); @@ -3283,13 +3283,19 @@ check_irq_on(); - l3 = searchp->nodelists[numa_node_id()]; + nodeid = numa_node_id(); + l3 = searchp->nodelists[nodeid]; if (l3->alien) drain_alien_cache(searchp, l3); - spin_lock_irq(&l3->list_lock); + + local_irq_disable(); + nodeid = numa_node_id(); + l3 = searchp->nodelists[nodeid]; + + spin_lock(&l3->list_lock); drain_array_locked(searchp, ac_data(searchp), 0, - numa_node_id()); + nodeid); if (time_after(l3->next_reap, jiffies)) goto next_unlock; @@ -3298,7 +3304,7 @@ if (l3->shared) drain_array_locked(searchp, l3->shared, 0, - numa_node_id()); + nodeid); if (l3->free_touched) { l3->free_touched = 0; @@ -3327,7 +3333,8 @@ spin_lock_irq(&l3->list_lock); } while(--tofree > 0); next_unlock: - spin_unlock_irq(&l3->list_lock); + spin_unlock(&l3->list_lock); + local_irq_enable(); next: cond_resched(); }