]> git.baikalelectronics.ru Git - kernel.git/commit
SLUB: Remove checks for MAX_PARTIAL from kmem_cache_shrink
authorChristoph Lameter <clameter@sgi.com>
Mon, 30 Jul 2007 20:06:46 +0000 (13:06 -0700)
committerChristoph Lameter <clameter@sgi.com>
Fri, 10 Aug 2007 04:57:15 +0000 (21:57 -0700)
commit8a6cc982d6236f98f120c3b5fe4218e546b6ed7a
tree47382ad57b48a1a0e46a6190991f88a9e6973e45
parentb450abfb5c3631ecf9ce60bb4c45e4e170bb60db
SLUB: Remove checks for MAX_PARTIAL from kmem_cache_shrink

The MAX_PARTIAL checks were supposed to be an optimization. However, slab
shrinking is a manually triggered process either through running slabinfo
or by the kernel calling kmem_cache_shrink.

If one really wants to shrink a slab then all operations should be done
regardless of the size of the partial list. This also fixes an issue that
could surface if the number of partial slabs was initially above MAX_PARTIAL
in kmem_cache_shrink and later drops below MAX_PARTIAL through the
elimination of empty slabs on the partial list (rare). In that case a few
slabs may be left off the partial list (and only be put back when they
are empty).

Signed-off-by: Christoph Lameter <clameter@sgi.com>
mm/slub.c