[slubllv3 20/21] slub: Not necessary to check for empty slab on load_freelist

From: Christoph Lameter
Date: Fri Apr 15 2011 - 16:49:43 EST


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-04-01 10:22:56.000000000 -0500
+++ linux-2.6/mm/slub.c 2011-04-01 10:22:58.000000000 -0500
@@ -1976,14 +1976,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);

#ifdef CONFIG_CMPXCHG_LOCAL

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/