[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1107220933570.2707@router.home>
Date: Fri, 22 Jul 2011 09:35:14 -0500 (CDT)
From: Christoph Lameter <cl@...ux.com>
To: Rabin Vincent <rabin@....in>
cc: penberg@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: "slub: Rework allocator fastpaths" and slub debugging
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@...ux.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())
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists