]> git.baikalelectronics.ru Git - kernel.git/commit
slub: Fix partial count comparison confusion
authorChristoph Lameter <cl@linux.com>
Tue, 9 Aug 2011 18:01:32 +0000 (13:01 -0500)
committerPekka Enberg <penberg@kernel.org>
Tue, 9 Aug 2011 18:12:31 +0000 (21:12 +0300)
commit3c58ea6d6c72c737f117946deb0d517370b22b08
tree53626e529423c12d082cbcc23012de0b39f26e4d
parent094d10af5887214167d85fdf44ffe29f24d246e0
slub: Fix partial count comparison confusion

deactivate_slab() has the comparison if more than the minimum number of
partial pages are in the partial list wrong. An effect of this may be that
empty pages are not freed from deactivate_slab(). The result could be an
OOM due to growth of the partial slabs per node. Frees mostly occur from
__slab_free which is okay so this would only affect use cases where a lot
of switching around of per cpu slabs occur.

Switching per cpu slabs occurs with high frequency if debugging options are
enabled.

Reported-and-tested-by: Xiaotian Feng <xtfeng@gmail.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slub.c