[PATCH] slub: look up object from the freelist once
From: Pekka J Enberg
Date: Fri Feb 29 2008 - 04:07:42 EST
From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
We only need to look up object from c->page->freelist once in
__slab_alloc().
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
---
mm/slub.c | 2 --
1 file changed, 2 deletions(-)
Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c
+++ linux-2.6/mm/slub.c
@@ -1522,7 +1522,6 @@ load_freelist:
if (unlikely(SlabDebug(c->page)))
goto debug;
- object = c->page->freelist;
c->freelist = object[c->offset];
c->page->inuse = s->objects;
c->page->freelist = c->page->end;
@@ -1578,7 +1577,6 @@ new_slab:
return NULL;
debug:
- object = c->page->freelist;
if (!alloc_debug_processing(s, c->page, object, addr))
goto another_slab;
--
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/