[slubllv4 15/16] slub: Not necessary to check for empty slab on load_freelist

Christoph Lameter
2011-05-06T18:07:11Z

[-- Attachment #1: goto_load_freelist --]
[-- Type: text/plain, Size: 746 bytes --]

Load freelist is now only branched to if there are objects available.
So no need to check.

---
mm/slub.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c 2011-05-06 09:06:34.000000000 -0500
+++ linux-2.6/mm/slub.c 2011-05-06 09:06:37.000000000 -0500
@@ -1966,14 +1966,13 @@ static void *__slab_alloc(struct kmem_ca
"__slab_alloc"));
}

-load_freelist:
- VM_BUG_ON(!page->frozen);
-
if (unlikely(!object)) {
c->page = NULL;
goto new_slab;
}

+load_freelist:
+ VM_BUG_ON(!page->frozen);
c->freelist = get_freepointer(s, object);
c->tid = next_tid(c->tid);
local_irq_restore(flags);