2008-02-29 09:07:42

by Pekka Enberg

[permalink] [raw]
Subject: [PATCH] slub: look up object from the freelist once

From: Pekka Enberg <[email protected]>

We only need to look up object from c->page->freelist once in
__slab_alloc().

Signed-off-by: Pekka Enberg <[email protected]>
---
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;


2008-02-29 19:44:18

by Christoph Lameter

[permalink] [raw]
Subject: Re: [PATCH] slub: look up object from the freelist once

Ok. Will queue for 2.6.25.