Index: linux-2.6.21-rc6/mm/slub.c =================================================================== --- linux-2.6.21-rc6.orig/mm/slub.c 2007-04-10 14:16:33.000000000 -0700 +++ linux-2.6.21-rc6/mm/slub.c 2007-04-10 14:19:05.000000000 -0700 @@ -961,6 +961,12 @@ static struct page *get_any_partial(stru * * A higher ratio means slabs may be taken from other nodes * thus reducing the number of partial slabs on those nodes. + * + * If /sys/slab/xx/defrag_ratio is set to 100 (which makes + * defrag_ratio = 1000) then every (well almost) allocation + * will first attempt to defrag slab caches on other nodes. This + * means scanning over all nodes to look for partial slabs which + * may be a bit expensive to do on every slab allocation. */ if (!s->defrag_ratio || get_cycles() % 1024 > s->defrag_ratio) return NULL;