Re: 2.6.21-rc5-mm4 (SLUB)

From: Christoph Lameter
Date: Wed Apr 04 2007 - 13:03:29 EST


On Wed, 4 Apr 2007, Badari Pulavarty wrote:

> On Tue, 2007-04-03 at 16:55 -0700, Christoph Lameter wrote:
> > On Tue, 3 Apr 2007, Badari Pulavarty wrote:
> >
> > > Hmm. booted fine with slub_debug :(
> >
> > Try to selectively disable debug options... if you got the
> > time...
> >
> > F.e. Try with sanity checks only
> >
> > slub_debug=F
>
> slub_debug=F got something.

Ahh.... Seems that the first 4 bytes of the allocations is zapped after
the object has been freed. Can you trap writes to the first four bytes of
the object? This should give you the culprit.

The other thing is that the system is performing DMA allocations
for the file cache???? Then its running out of memory.

Argh.... We use GFP DMA bitmask to check SLAB flags field:

Try this fix:



SLUB: Use correct flags to check for DMA cache

We use a GFP mask to check the SLAB flags if this is a DMA cache.

Fix this by using the correct SLAB mask and then use the SLUB_DMA
for the ORing of flags. If the system does not support DMA then
we will OR zero which will hopefully get the compiler to drop the
useless if statement as well.

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>

Index: linux-2.6.21-rc5-mm4/mm/slub.c
===================================================================
--- linux-2.6.21-rc5-mm4.orig/mm/slub.c 2007-04-04 09:59:05.000000000 -0700
+++ linux-2.6.21-rc5-mm4/mm/slub.c 2007-04-04 10:01:14.000000000 -0700
@@ -678,8 +678,8 @@ static struct page *allocate_slab(struct
if (s->order)
flags |= __GFP_COMP;

- if (s->flags & SLUB_DMA)
- flags |= GFP_DMA;
+ if (s->flags & SLAB_CACHE_DMA)
+ flags |= SLUB_DMA;

if (node == -1)
page = alloc_pages(flags, s->order);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/