Commit 76931434 authored by Pekka J Enberg's avatar Pekka J Enberg Committed by Christoph Lameter

slub: look up object from the freelist once

We only need to look up object from c->page->freelist once in
__slab_alloc().
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
parent 6446faa2
...@@ -1486,7 +1486,6 @@ load_freelist: ...@@ -1486,7 +1486,6 @@ load_freelist:
if (unlikely(SlabDebug(c->page))) if (unlikely(SlabDebug(c->page)))
goto debug; goto debug;
object = c->page->freelist;
c->freelist = object[c->offset]; c->freelist = object[c->offset];
c->page->inuse = s->objects; c->page->inuse = s->objects;
c->page->freelist = NULL; c->page->freelist = NULL;
...@@ -1542,7 +1541,6 @@ new_slab: ...@@ -1542,7 +1541,6 @@ new_slab:
return NULL; return NULL;
debug: debug:
object = c->page->freelist;
if (!alloc_debug_processing(s, c->page, object, addr)) if (!alloc_debug_processing(s, c->page, object, addr))
goto another_slab; goto another_slab;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment