From: Christoph Lameter <cl@linux.com>
To: Rabin Vincent <rabin@rab.in>
Cc: penberg@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: "slub: Rework allocator fastpaths" and slub debugging
Date: Fri, 22 Jul 2011 09:35:14 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1107220933570.2707@router.home> (raw)
In-Reply-To: <alpine.DEB.2.00.1107211351250.3995@router.home>
Subject: slub: When allocating a new slab also prep the first object
We need to branch to the debug code for the first object if we allocate
a new slab otherwise the first object will be marked wrongly as inactive.
Signed-off-by: Christoph Lameter <cl@linux.com>
---
mm/slub.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6/mm/slub.c
===================================================================
--- linux-2.6.orig/mm/slub.c 2011-07-22 09:29:05.465576295 -0500
+++ linux-2.6/mm/slub.c 2011-07-22 09:29:55.345575976 -0500
@@ -2082,6 +2082,9 @@ new_slab:
stat(s, ALLOC_SLAB);
c->node = page_to_nid(page);
c->page = page;
+
+ if (kmem_cache_debug(s))
+ goto debug;
goto load_freelist;
}
if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())
next prev parent reply other threads:[~2011-07-22 14:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-21 18:44 Rabin Vincent
2011-07-21 18:54 ` Christoph Lameter
2011-07-22 14:35 ` Christoph Lameter [this message]
2011-07-22 15:34 ` Rabin Vincent
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=alpine.DEB.2.00.1107220933570.2707@router.home \
--to=cl@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=rabin@rab.in \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®