I've performed a larger modification of slab.c, as a preparation for NUMA awareness. Could you please test it? Especially SMP, or non-x86 platforms would be interesting. A kernprof profile, with function counts, for several loads would be great, but I don't know if kernprof works with recent 2.5 kernels. With slab debugging enabled, it's possible to measure the efficiency of the headarrays: The block after the last ":" list the hits/misses: names_cache [snip] : 262924 118 263042 0 262924 times kmem_cache_alloc(names_cache) found an object in the headarray, only 118 times it had to go back into the slab lists. 263042 times kmem_cache_free(names_cache) could store an object directly in the per-cpu array, it never had to flush the array. Note that additional flushing can happen in a timer, which is not counted right now. The patch is against 2.5.40. It relies on Ingo's smptimers. Changes: - always enable head arrays, right now they are SMP only. - make the per-cpu arrays strictly LIFO. - move slabs during kmem_cache_free to the end of the partial list, that should reduce the internal fragmentation. - smp_call_function() doesn't break disable_irq() anymore, remove the workarounds that were necessary. - Add head arrays to all caches, remove the fallback to no-headarray. - Add a dynamic limit to the lengh of the free list - Do not flush headarrays if they were recently accessed. - Do not flush free slabs, if the free slab list was recently accessed. - Remove the GROWN flag: activity matters, not when the cache was grown last. - flush free list and head array in a per-cpu timer - remove kmem_ from slab internal functions. - poison all objects, even objects with constructors - add further debug checks [wrong interrupt flags, might_sleep] -- Manfred