Commit dcc3be6a authored by Alex Shi's avatar Alex Shi Committed by Pekka Enberg

slub: Discard slab page when node partial > minimum partial number

Discarding slab should be done when node partial > min_partial.  Otherwise,
node partial slab may eat up all memory.
Signed-off-by: default avatarAlex Shi <alex.shi@intel.com>
Acked-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 9f264904
......@@ -1953,7 +1953,7 @@ static void unfreeze_partials(struct kmem_cache *s)
new.frozen = 0;
if (!new.inuse && (!n || n->nr_partial < s->min_partial))
if (!new.inuse && (!n || n->nr_partial > s->min_partial))
m = M_FREE;
else {
struct kmem_cache_node *n2 = get_node(s,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment