diff options
author | Christoph Lameter <cl@linux.com> | 2011-06-01 13:25:59 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-07-02 06:26:57 -0400 |
commit | 4eade540fc35353813097bfdb39465c9b8847a15 (patch) | |
tree | 3e92af005f3fea4d84de049764c72fac95150e7c /mm | |
parent | 03e404af26dc2ea0d278d7a342de0aab394793ce (diff) |
slub: Not necessary to check for empty slab on load_freelist
load_freelist is now only branched to only if there are objects available.
So no need to check the object variable for NULL.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1997,9 +1997,6 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, | |||
1997 | NULL, new.counters, | 1997 | NULL, new.counters, |
1998 | "__slab_alloc")); | 1998 | "__slab_alloc")); |
1999 | 1999 | ||
2000 | load_freelist: | ||
2001 | VM_BUG_ON(!page->frozen); | ||
2002 | |||
2003 | if (unlikely(!object)) { | 2000 | if (unlikely(!object)) { |
2004 | c->page = NULL; | 2001 | c->page = NULL; |
2005 | stat(s, DEACTIVATE_BYPASS); | 2002 | stat(s, DEACTIVATE_BYPASS); |
@@ -2008,6 +2005,8 @@ load_freelist: | |||
2008 | 2005 | ||
2009 | stat(s, ALLOC_REFILL); | 2006 | stat(s, ALLOC_REFILL); |
2010 | 2007 | ||
2008 | load_freelist: | ||
2009 | VM_BUG_ON(!page->frozen); | ||
2011 | c->freelist = get_freepointer(s, object); | 2010 | c->freelist = get_freepointer(s, object); |
2012 | c->tid = next_tid(c->tid); | 2011 | c->tid = next_tid(c->tid); |
2013 | local_irq_restore(flags); | 2012 | local_irq_restore(flags); |