An performance tweak (I guess): perform the cross-CPU cache reclaim operation outside the global semaphore. Needs more explanation. ===================================== --- 2.4.19-pre6/mm/slab.c~aa-170-drain_cpu_caches Fri Apr 5 01:08:02 2002 +++ 2.4.19-pre6-akpm/mm/slab.c Fri Apr 5 01:08:02 2002 @@ -914,8 +914,6 @@ static int __kmem_cache_shrink(kmem_cach slab_t *slabp; int ret; - drain_cpu_caches(cachep); - spin_lock_irq(&cachep->spinlock); /* If the cache is growing, stop shrinking. */ @@ -986,6 +984,8 @@ int kmem_cache_destroy (kmem_cache_t * c list_del(&cachep->next); up(&cache_chain_sem); + drain_cpu_caches(cachep); + if (__kmem_cache_shrink(cachep)) { printk(KERN_ERR "kmem_cache_destroy: Can't free all objects %p\n", cachep);