LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pekka J Enberg <penberg@cs.helsinki.fi>
To: clameter@sgi.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] slub: look up object from the freelist once
Date: Fri, 29 Feb 2008 11:07:30 +0200 (EET) [thread overview]
Message-ID: <Pine.LNX.4.64.0802291105230.5423@sbz-30.cs.Helsinki.FI> (raw)
From: Pekka Enberg <penberg@cs.helsinki.fi>
We only need to look up object from c->page->freelist once in
__slab_alloc().
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
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;
next reply other threads:[~2008-02-29 9:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-29 9:07 Pekka J Enberg [this message]
2008-02-29 19:44 ` Christoph Lameter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0802291105230.5423@sbz-30.cs.Helsinki.FI \
--to=penberg@cs.helsinki.fi \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH] slub: look up object from the freelist once' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).