slub: Get rid of the another_slab label
We can avoid deactivate slab in special cases if we do the deactivation of slabs in each code flow that leads to new_slab. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
parent
80f08c191f
commit
fc59c05306
11
mm/slub.c
11
mm/slub.c
@ -1965,8 +1965,10 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
|
|||||||
if (!page)
|
if (!page)
|
||||||
goto new_slab;
|
goto new_slab;
|
||||||
|
|
||||||
if (unlikely(!node_match(c, node)))
|
if (unlikely(!node_match(c, node))) {
|
||||||
goto another_slab;
|
deactivate_slab(s, c);
|
||||||
|
goto new_slab;
|
||||||
|
}
|
||||||
|
|
||||||
stat(s, ALLOC_SLOWPATH);
|
stat(s, ALLOC_SLOWPATH);
|
||||||
|
|
||||||
@ -1986,7 +1988,7 @@ load_freelist:
|
|||||||
VM_BUG_ON(!page->frozen);
|
VM_BUG_ON(!page->frozen);
|
||||||
|
|
||||||
if (unlikely(!object))
|
if (unlikely(!object))
|
||||||
goto another_slab;
|
goto new_slab;
|
||||||
|
|
||||||
stat(s, ALLOC_REFILL);
|
stat(s, ALLOC_REFILL);
|
||||||
|
|
||||||
@ -1995,9 +1997,6 @@ load_freelist:
|
|||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
return object;
|
return object;
|
||||||
|
|
||||||
another_slab:
|
|
||||||
deactivate_slab(s, c);
|
|
||||||
|
|
||||||
new_slab:
|
new_slab:
|
||||||
page = get_partial(s, gfpflags, node);
|
page = get_partial(s, gfpflags, node);
|
||||||
if (page) {
|
if (page) {
|
||||||
|
Loading…
Reference in New Issue
Block a user