On Wed, 4 Apr 2007, Badari Pulavarty wrote:

> Well !! Helps a little, but not enough to boot (hangs little later) :(
> I will try to get stack trace for that.

Great! Thanks for all the debugging help.

 
> Processor 6 found.
> Processor 7 found.
> Brought up 8 CPUs
> mm/memory.c:111: bad pud c0000000f20c0480.

Hmmm... Checking for slabs used in powerpc arch code:

The pgtable cache is configured as


          pgtable_cache[i] = kmem_cache_create(name,
                                                     size, size,
                                                     SLAB_HWCACHE_ALIGN |
                                                     SLAB_MUST_HWCACHE_ALIGN,
                                                     zero_ctor,
                                                     NULL);

Hmmm.... aligned slabs at size and then we MUST_HWCACHE_ALIGN?? Two 
competing alignment requirements and a constructor. Constructor requires
the moving of the free pointer after the slab and thus increases the slab 
size.

Sigh. IF SLAB_HWCACHE_ALIGN is set then SLUB believes this to be the 
ultimate demand that overrides all other alignments and only aligns to the 
cacheline. Try the following fix:



SLUB: Treat SLAB_HWCACHE_ALIGN as a mininum and not as *the* alignment

If the specified alignment is higher than L1_CACHE_BYTES and
SLAB_HWCACHE_ALIGN is set then use the higher alignment.

Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>

Index: linux-2.6.21-rc5-mm4/mm/slub.c
===================================================================
--- linux-2.6.21-rc5-mm4.orig/mm/slub.c 2007-04-04 10:09:20.000000000 -0700
+++ linux-2.6.21-rc5-mm4/mm/slub.c      2007-04-04 10:09:42.000000000 -0700
@@ -1373,10 +1373,7 @@ static int calculate_order(int size)
 static unsigned long calculate_alignment(unsigned long flags,
                unsigned long align)
 {
-       if (flags & SLAB_HWCACHE_ALIGN)
-               return L1_CACHE_BYTES;
-
-       if (flags & SLAB_MUST_HWCACHE_ALIGN)
+       if (flags & (SLAB_MUST_HWCACHE_ALIGN | SLAB_HWCACHE_ALIGN))
                return max_t(unsigned long, align, L1_CACHE_BYTES);
 
        if (align < ARCH_SLAB_MINALIGN)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to