SLUB: nr_partial needs to be decremented in cache_shrink() nr_partial accounting is off because we do not go through the usual path to dispose of partial pages. Add the necessary decrement. Also do the same fix on close (maybe pointless but for cleannesses sake). Signed-off-by: Christoph Lameter Index: linux-2.6.21-rc7-mm2/mm/slub.c =================================================================== --- linux-2.6.21-rc7-mm2.orig/mm/slub.c 2007-04-26 15:15:38.000000000 -0700 +++ linux-2.6.21-rc7-mm2/mm/slub.c 2007-04-26 15:16:13.000000000 -0700 @@ -1925,7 +1925,7 @@ static int kmem_cache_close(struct kmem_ for_each_online_node(node) { struct kmem_cache_node *n = get_node(s, node); - free_list(s, n, &n->partial); + n->nr_partial -= free_list(s, n, &n->partial); if (atomic_long_read(&n->nr_slabs)) return 1; } @@ -2220,6 +2220,7 @@ int kmem_cache_shrink(struct kmem_cache list_for_each_entry_safe(page, t, &n->partial, lru) { if (!page->inuse) { list_del(&page->lru); + n->nr_partial--; discard_slab(s, page); } else if (n->nr_partial > MAX_PARTIAL)