aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2011-06-01 13:25:56 -0400
committerPekka Enberg <penberg@kernel.org>2011-07-02 06:26:56 -0400
commitfc59c05306fe1dcfa3fb8ba34ed45407fba4689c (patch)
treeb187d9819cdb921fb6b575d10e487915b2a89dbe /mm
parent80f08c191f6c9563641291bea80657a3b9faabf0 (diff)
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>
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/slub.c b/mm/slub.c
index cb6b0857e1a6..41a15c1d8068 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1965,8 +1965,10 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
1965 if (!page) 1965 if (!page)
1966 goto new_slab; 1966 goto new_slab;
1967 1967
1968 if (unlikely(!node_match(c, node))) 1968 if (unlikely(!node_match(c, node))) {
1969 goto another_slab; 1969 deactivate_slab(s, c);
1970 goto new_slab;
1971 }
1970 1972
1971 stat(s, ALLOC_SLOWPATH); 1973 stat(s, ALLOC_SLOWPATH);
1972 1974
@@ -1986,7 +1988,7 @@ load_freelist:
1986 VM_BUG_ON(!page->frozen); 1988 VM_BUG_ON(!page->frozen);
1987 1989
1988 if (unlikely(!object)) 1990 if (unlikely(!object))
1989 goto another_slab; 1991 goto new_slab;
1990 1992
1991 stat(s, ALLOC_REFILL); 1993 stat(s, ALLOC_REFILL);
1992 1994
@@ -1995,9 +1997,6 @@ load_freelist:
1995 local_irq_restore(flags); 1997 local_irq_restore(flags);
1996 return object; 1998 return object;
1997 1999
1998another_slab:
1999 deactivate_slab(s, c);
2000
2001new_slab: 2000new_slab:
2002 page = get_partial(s, gfpflags, node); 2001 page = get_partial(s, gfpflags, node);
2003 if (page) { 2002 if (page) {