Index: linux-2.6.14-rc2/mm/slab.c =================================================================== --- linux-2.6.14-rc2.orig/mm/slab.c 2005-09-27 10:05:27.000000000 -0700 +++ linux-2.6.14-rc2/mm/slab.c 2005-09-27 10:47:43.000000000 -0700 @@ -2354,7 +2354,7 @@ bad: #define check_slabp(x,y) do { } while(0) #endif -static void *cache_alloc_refill(kmem_cache_t *cachep, unsigned int __nocast flags) +static void *cache_alloc_refill(kmem_cache_t *cachep, unsigned int __nocast flags, int node) { int batchcount; struct kmem_list3 *l3; @@ -2371,7 +2371,7 @@ retry: */ batchcount = BATCHREFILL_LIMIT; } - l3 = cachep->nodelists[numa_node_id()]; + l3 = cachep->nodelists[node]; BUG_ON(ac->avail > 0 || !l3); spin_lock(&l3->list_lock); @@ -2439,7 +2439,7 @@ alloc_done: if (unlikely(!ac->avail)) { int x; - x = cache_grow(cachep, flags, numa_node_id()); + x = cache_grow(cachep, flags, node); // cache_grow can reenable interrupts, then ac could change. ac = ac_data(cachep); @@ -2521,7 +2521,7 @@ static inline void *____cache_alloc(kmem objp = ac->entry[--ac->avail]; } else { STATS_INC_ALLOCMISS(cachep); - objp = cache_alloc_refill(cachep, flags); + objp = cache_alloc_refill(cachep, flags, numa_node_id()); } return objp; }