提交 76be8950 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

SLUB: Improve hackbench speed

Increase the mininum number of partial slabs to keep around and put
partial slabs to the end of the partial queue so that they can add
more objects.
Signed-off-by: NChristoph Lameter <clameter@sgi.com>
Reviewed-by: NPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 ea67db4c
......@@ -172,7 +172,7 @@ static inline void ClearSlabDebug(struct page *page)
* Mininum number of partial slabs. These will be left on the partial
* lists even if they are empty. kmem_cache_shrink may reclaim them.
*/
#define MIN_PARTIAL 2
#define MIN_PARTIAL 5
/*
* Maximum number of desirable partial slabs.
......@@ -1613,7 +1613,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
* then add it.
*/
if (unlikely(!prior))
add_partial(get_node(s, page_to_nid(page)), page);
add_partial_tail(get_node(s, page_to_nid(page)), page);
out_unlock:
slab_unlock(page);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册