diff options
author | Alex Shi <alex.shi@intel.com> | 2011-09-06 02:46:01 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-09-27 16:03:31 -0400 |
commit | dcc3be6a548a1e51adaab3be6d9dfbb68bc0e3a0 (patch) | |
tree | afe8ced0d1944ed1a33db168eae6686bd6d038bb /mm | |
parent | 9f26490412cf15b04ac8f44a512ba0b09e774576 (diff) |
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: Alex Shi <alex.shi@intel.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1953,7 +1953,7 @@ static void unfreeze_partials(struct kmem_cache *s) | |||
1953 | 1953 | ||
1954 | new.frozen = 0; | 1954 | new.frozen = 0; |
1955 | 1955 | ||
1956 | if (!new.inuse && (!n || n->nr_partial < s->min_partial)) | 1956 | if (!new.inuse && (!n || n->nr_partial > s->min_partial)) |
1957 | m = M_FREE; | 1957 | m = M_FREE; |
1958 | else { | 1958 | else { |
1959 | struct kmem_cache_node *n2 = get_node(s, | 1959 | struct kmem_cache_node *n2 = get_node(s, |