SLUB: Avoid touching per cpu array if kfree occurs to non cpu slab We can avoid touching the per cpu array cacheline if the kfree is not occurring to a per cpu slab. Signed-off-by: Christoph Lameter Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2007-07-02 10:21:56.000000000 -0700 +++ linux-2.6/mm/slub.c 2007-07-02 10:24:53.000000000 -0700 @@ -1628,8 +1628,9 @@ unsigned long flags; local_irq_save(flags); - if (likely(page == s->cpu_slab[smp_processor_id()] && - !SlabDebug(page))) { + if (likely(SlabFrozen(page) && + page == s->cpu_slab[smp_processor_id()] && + !SlabDebug(page))) { object[page->offset] = page->lockless_freelist; page->lockless_freelist = object; } else