Skip to content
Commit 130655ef authored by Shaohua Li's avatar Shaohua Li Committed by Pekka Enberg
Browse files

slub: add slab with one free object to partial list tail



The slab has just one free object, adding it to partial list head doesn't make
sense. And it can cause lock contentation. For example,
1. CPU takes the slab from partial list
2. fetch an object
3. switch to another slab
4. free an object, then the slab is added to partial list again
In this way n->list_lock will be heavily contended.
In fact, Alex had a hackbench regression. 3.1-rc1 performance drops about 70%
against 3.0. This patch fixes it.

Acked-by: default avatarChristoph Lameter <cl@linux.com>
Reported-by: default avatarAlex Shi <alex.shi@intel.com>
Signed-off-by: default avatarShaohua Li <shli@kernel.org>
Signed-off-by: default avatarShaohua Li <shaohua.li@intel.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 81107188
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment