Skip to content

Commit

Permalink
slub: use correct parameter to add a page to partial list tail
Browse files Browse the repository at this point in the history
unfreeze_partials() needs add the page to partial list tail, since such page
hasn't too many free objects. We now explictly use DEACTIVATE_TO_TAIL for this,
while DEACTIVATE_TO_TAIL != 1. This will cause performance regression (eg, more
lock contention in node->list_lock) without below fix.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Christoph Lameter <cl@linux.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information
Shaohua Li authored and Pekka Enberg committed Nov 15, 2011
1 parent 1ea6b8f commit f64ae04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1904,7 +1904,8 @@ static void unfreeze_partials(struct kmem_cache *s)
if (l == M_PARTIAL)
remove_partial(n, page);
else
add_partial(n, page, 1);
add_partial(n, page,
DEACTIVATE_TO_TAIL);

l = m;
}
Expand Down

0 comments on commit f64ae04

Please sign in to comment.