]> git.baikalelectronics.ru Git - kernel.git/commit
SLUB: Add MIN_PARTIAL
authorChristoph Lameter <clameter@sgi.com>
Sun, 6 May 2007 21:49:44 +0000 (14:49 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:12:54 +0000 (12:12 -0700)
commit0c396c377d2daf78cef744cc09244191aaf5e9ab
tree6ee56b3248ccd89db45f6bd8d532005fc61cc00b
parentba5f1ad96b2396996d8c63d3d29745a6eb7d5ecb
SLUB: Add MIN_PARTIAL

We leave a mininum of partial slabs on nodes when we search for
partial slabs on other node. Define a constant for that value.

Then modify slub to keep MIN_PARTIAL slabs around.

This avoids bad situations where a function frees the last object
in a slab (which results in the page being returned to the page
allocator) only to then allocate one again (which requires getting
a page back from the page allocator if the partial list was empty).
Keeping a couple of slabs on the partial list reduces overhead.

Empty slabs are added to the end of the partial list to insure that
partially allocated slabs are consumed first (defragmentation).

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c