提交 76931434 编写于 作者: P Pekka J Enberg 提交者: 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: NPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: NChristoph Lameter <clameter@sgi.com>
上级 6446faa2
......@@ -1486,7 +1486,6 @@ static void *__slab_alloc(struct kmem_cache *s,
if (unlikely(SlabDebug(c->page)))
goto debug;
object = c->page->freelist;
c->freelist = object[c->offset];
c->page->inuse = s->objects;
c->page->freelist = NULL;
......@@ -1542,7 +1541,6 @@ static void *__slab_alloc(struct kmem_cache *s,
return NULL;
debug:
object = c->page->freelist;
if (!alloc_debug_processing(s, c->page, object, addr))
goto another_slab;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册