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>
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,