Attached is my numa aware slab allocator, rediffed against 2.5.46. It makes the objects that are returned from kmem_cache_alloc strictly node local. Unfortunately this means that kmem_cache_free must return objects to the home node, which is expensive. (The return is batched, but it's still expensive) I'm not sure that the patch will improve the performance - benchmarks are now needed. TODO: - implement ptr_to_nodeid() for all archs.The current implementation is a dummy, to test the code on non-NUMA systems. - switch from MAX_NUMNODES to numnodes - Anton proposed that. - improve the handling of nodes without cpus or without memory. - add a kmem_cache_alloc_fromnode() function - replace the kmem_list3 array with an array of pointers, and allocate the storage from the right node. - allocate the head arrays from the node that is local to the cpu that accesses the head array. - check for regressions - I was careful not to undo any cleanups that happened between 2.5.42 and 46, but it's possible that I missed some. -- Manfred