mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
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: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Christoph Lameter <clameter@sgi.com>
This commit is contained in:
parent
6446faa2ff
commit
7693143481
1 changed files with 0 additions and 2 deletions
|
@ -1486,7 +1486,6 @@ static void *__slab_alloc(struct kmem_cache *s,
|
||||||
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 @@ static void *__slab_alloc(struct kmem_cache *s,
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue