linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Christoph Lameter <cl@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linuxppc-dev@ozlabs.org, linux-next@vger.kernel.org
Subject: Re: Next April 28: boot failure on PowerPC with SLQB
Date: Wed, 29 Apr 2009 13:36:05 +0200	[thread overview]
Message-ID: <20090429113604.GE3398@wotan.suse.de> (raw)
In-Reply-To: <84144f020904280422s6a9a277fjc4619c904f37e5ca@mail.gmail.com>

On Tue, Apr 28, 2009 at 02:22:06PM +0300, Pekka Enberg wrote:
> Nick,
> 
> Here's another one. I think we need to either fix these rather quickly
> or make SLUB the defaut for linux-next again so we don't interfere
> with other testing.
> 
>                                      Pekka
> 
> On Tue, Apr 28, 2009 at 2:10 PM, Sachin Sant <sachinp@in.ibm.com> wrote:
> > Today's next tree fails to boot on variety of powerpc boxes (Power5, power6)
> >
> > Memory: 3882624k/4194304k available (8384k kernel code, 311680k reserved,
> > 2048k data, 4285k bss, 512k init)
> > Kernel panic - not syncing: kmem_cache_create(): failed to create slab
> > `kmalloc'
> >
> > Call Trace:
> > [c000000000a33c30] [c000000000011668] .show_stack+0x6c/0x16c (unreliable)
> > [c000000000a33ce0] [c000000000563c8c] .panic+0x80/0x1a8
> > [c000000000a33d70] [c0000000001410d8] .kmem_cache_open+0x4e8/0x51c
> > [c000000000a33e20] [c0000000007d90b8] .kmem_cache_init+0x264/0x35c
> > [c000000000a33ee0] [c0000000007b0b68] .start_kernel+0x404/0x51c
> > [c000000000a33f90] [c0000000000083d8] .start_here_common+0x1c/0x44

OK I think the problem is that with 64K pages you get a default MAX_ORDER
of 9, and slqb is trying to create slabs which exceed that size..

Does this help?
---

SLQB: fix slab calculation

SLQB didn't consider MAX_ORDER when defining which sizes of kmalloc
slabs to create. It panics at boot if it tries to create a cache
which exceeds MAX_ORDER-1.

Signed-off-by: Nick Piggin <npiggin@suse.de>
---
Index: linux-2.6/include/linux/slqb_def.h
===================================================================
--- linux-2.6.orig/include/linux/slqb_def.h	2009-04-29 21:27:30.000000000 +1000
+++ linux-2.6/include/linux/slqb_def.h	2009-04-29 21:28:13.000000000 +1000
@@ -172,7 +172,8 @@ struct kmem_cache {
 #endif
 
 #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE)
-#define KMALLOC_SHIFT_SLQB_HIGH (PAGE_SHIFT + 9)
+#define KMALLOC_SHIFT_SLQB_HIGH ((PAGE_SHIFT + 9) < MAX_ORDER ? \
+				(PAGE_SHIFT + 9) : (MAX_ORDER - 1))
 
 extern struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_SLQB_HIGH + 1];
 extern struct kmem_cache kmalloc_caches_dma[KMALLOC_SHIFT_SLQB_HIGH + 1];

  parent reply	other threads:[~2009-04-29 11:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28  6:53 linux-next: Tree for April 28 Stephen Rothwell
2009-04-28 11:10 ` Next April 28: boot failure on PowerPC with SLQB Sachin Sant
2009-04-28 11:22   ` Pekka Enberg
2009-04-29  7:04     ` Nick Piggin
2009-04-29 11:36     ` Nick Piggin [this message]
2009-04-29 16:26       ` Sachin Sant
2009-04-30  3:21         ` Stephen Rothwell
2009-04-30  4:11         ` Nick Piggin
2009-04-30  5:36           ` Sachin Sant
2009-04-30  6:03             ` Nick Piggin
2009-04-30  6:42               ` Sachin Sant
2009-04-30  6:41             ` Nick Piggin
2009-04-30  9:47               ` Sachin Sant
2009-04-30 10:35                 ` Nick Piggin
2009-04-30 10:38                   ` Pekka Enberg
2009-04-30 11:00                     ` Stephen Rothwell
2009-04-30 11:10                       ` Pekka Enberg
2009-04-30 11:18                       ` Nick Piggin
2009-04-30 11:20                         ` Pekka Enberg
2009-04-30 11:26                           ` Nick Piggin
2009-04-30 13:05                           ` Nick Piggin
2009-04-30 14:00                             ` Stephen Rothwell
2009-04-30 14:10                               ` Nick Piggin
2009-05-03 11:51                                 ` Pekka Enberg
2009-04-30 14:10                             ` Anton Vorontsov
2009-05-03 11:51                               ` Pekka Enberg
2009-04-28 15:22 ` [PATCH] lockd: fix FILE_LOCKING=n build error Randy Dunlap
2009-04-28 15:38   ` Felix Blyakher
2009-04-28 17:21   ` J. Bruce Fields
2009-04-28 17:51     ` Randy Dunlap
2009-04-28 18:15       ` Trond Myklebust
2009-04-28 21:01         ` [PATCH v2] " Randy Dunlap
2009-04-28 21:40           ` J. Bruce Fields

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=20090429113604.GE3398@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).