Skip to content

Commit

Permalink
slub: Discard slab page when node partial > minimum partial number
Browse files Browse the repository at this point in the history
Discarding slab should be done when node partial > min_partial.  Otherwise,
node partial slab may eat up all memory.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information
Alex Shi authored and Pekka Enberg committed Sep 27, 2011
1 parent 9f26490 commit dcc3be6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dcc3be6

Please sign in to comment.