aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorPekka J Enberg <penberg@cs.helsinki.fi>2008-03-01 16:43:54 -0500
committerChristoph Lameter <clameter@sgi.com>2008-03-03 15:22:32 -0500
commit7693143481730686362cc6360e3d47c012d9b2c8 (patch)
treec621d072280676d62c3ae61ea97d3e8c471d1f92 /mm
parent6446faa2ff30ca77c5b25e886bbbfb81c63f1c91 (diff)
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>
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 10d546954efa..db8026ba049f 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1486,7 +1486,6 @@ load_freelist:
1486 if (unlikely(SlabDebug(c->page))) 1486 if (unlikely(SlabDebug(c->page)))
1487 goto debug; 1487 goto debug;
1488 1488
1489 object = c->page->freelist;
1490 c->freelist = object[c->offset]; 1489 c->freelist = object[c->offset];
1491 c->page->inuse = s->objects; 1490 c->page->inuse = s->objects;
1492 c->page->freelist = NULL; 1491 c->page->freelist = NULL;
@@ -1542,7 +1541,6 @@ new_slab:
1542 1541
1543 return NULL; 1542 return NULL;
1544debug: 1543debug:
1545 object = c->page->freelist;
1546 if (!alloc_debug_processing(s, c->page, object, addr)) 1544 if (!alloc_debug_processing(s, c->page, object, addr))
1547 goto another_slab; 1545 goto another_slab;
1548 1546