Re: slab hang on boot

2007-05-16 Thread David Miller
From: David Miller <[EMAIL PROTECTED]> Date: Tue, 15 May 2007 18:03:16 -0700 (PDT) > From: Christoph Lameter <[EMAIL PROTECTED]> > Date: Tue, 15 May 2007 18:00:23 -0700 (PDT) > > > Slab allocators: Define common size limitations > > Thanks for doing this work Christoph, I'll test this patch out

Re: slab hang on boot

2007-05-16 Thread David Miller
From: David Miller [EMAIL PROTECTED] Date: Tue, 15 May 2007 18:03:16 -0700 (PDT) From: Christoph Lameter [EMAIL PROTECTED] Date: Tue, 15 May 2007 18:00:23 -0700 (PDT) Slab allocators: Define common size limitations Thanks for doing this work Christoph, I'll test this patch out on all my

Re: slab hang on boot

2007-05-15 Thread David Miller
From: Christoph Lameter <[EMAIL PROTECTED]> Date: Tue, 15 May 2007 18:00:23 -0700 (PDT) > Slab allocators: Define common size limitations Thanks for doing this work Christoph, I'll test this patch out on all my sparc64 boxes, with both SLAB and SLUB, later this evening. - To unsubscribe from

Re: slab hang on boot

2007-05-15 Thread Christoph Lameter
Here is the patch. It probably does not apply cleanly against Andrew's tree. I am waiting for the new tree in order to submit it. Slab allocators: Define common size limitations Currently we have a maze of configuration variables that determine the maximum slab size. Worst of all it seems to

Re: slab hang on boot

2007-05-15 Thread Christoph Lameter
On Tue, 15 May 2007, Andrew Morton wrote: > > Try to define a compile-time array size with it smarty > > pants :-) > > confusedy pants, more like. > > > That's what we did initially and it doesn't work. > > This: > > struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1]

Re: slab hang on boot

2007-05-15 Thread Christoph Lameter
On Tue, 15 May 2007, Andrew Morton wrote: > Either that newly-added test isn't needed, or those ifdefs aren't needed? The #ifdefs dont do the proper job thus the hack for Dave. The following RFC will clean things up. http://marc.info/?l=linux-kernel=117919444827939=2 - To unsubscribe from

Re: slab hang on boot

2007-05-15 Thread David Miller
From: Andrew Morton <[EMAIL PROTECTED]> Date: Tue, 15 May 2007 17:29:57 -0700 > This: > > struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1] __cacheline_aligned; > > is still there. My bad, we tried using min_t() and that's what caused the problems, that's why we open-coded the macro

Re: slab hang on boot

2007-05-15 Thread Andrew Morton
On Tue, 15 May 2007 17:14:47 -0700 (PDT) David Miller <[EMAIL PROTECTED]> wrote: > From: Andrew Morton <[EMAIL PROTECTED]> > Date: Tue, 15 May 2007 16:56:36 -0700 > > > On Tue, 15 May 2007 16:45:22 -0700 (PDT) > > Christoph Lameter <[EMAIL PROTECTED]> wrote: > > > > > KMALLOC_SHIFT_HIGH is not

Re: slab hang on boot

2007-05-15 Thread David Miller
From: Andrew Morton <[EMAIL PROTECTED]> Date: Tue, 15 May 2007 16:56:36 -0700 > On Tue, 15 May 2007 16:45:22 -0700 (PDT) > Christoph Lameter <[EMAIL PROTECTED]> wrote: > > > KMALLOC_SHIFT_HIGH is not a constant but may be less than 25. > > It darn well better be a compile-time constant. Try to

Re: slab hang on boot

2007-05-15 Thread Andrew Morton
On Tue, 15 May 2007 16:45:22 -0700 (PDT) Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Tue, 15 May 2007, Andrew Morton wrote: > > > On Mon, 14 May 2007 16:46:17 -0700 (PDT) > > Christoph Lameter <[EMAIL PROTECTED]> wrote: > > > > > @@ -86,6 +87,9 @@ static inline int kmalloc_index(int size

Re: slab hang on boot

2007-05-15 Thread Christoph Lameter
On Tue, 15 May 2007, Andrew Morton wrote: > On Mon, 14 May 2007 16:46:17 -0700 (PDT) > Christoph Lameter <[EMAIL PROTECTED]> wrote: > > > @@ -86,6 +87,9 @@ static inline int kmalloc_index(int size > > */ > > WARN_ON_ONCE(size == 0); > > > > + if (size >= (1UL << KMALLOC_SHIFT_HIGH))

Re: slab hang on boot

2007-05-15 Thread Andrew Morton
On Mon, 14 May 2007 16:46:17 -0700 (PDT) Christoph Lameter <[EMAIL PROTECTED]> wrote: > @@ -86,6 +87,9 @@ static inline int kmalloc_index(int size >*/ > WARN_ON_ONCE(size == 0); > > + if (size >= (1UL << KMALLOC_SHIFT_HIGH)) > + return -1; > + I don't quite

Re: slab hang on boot

2007-05-15 Thread Andrew Morton
On Mon, 14 May 2007 16:46:17 -0700 (PDT) Christoph Lameter [EMAIL PROTECTED] wrote: @@ -86,6 +87,9 @@ static inline int kmalloc_index(int size */ WARN_ON_ONCE(size == 0); + if (size = (1UL KMALLOC_SHIFT_HIGH)) + return -1; + I don't quite understand why we

Re: slab hang on boot

2007-05-15 Thread Christoph Lameter
On Tue, 15 May 2007, Andrew Morton wrote: On Mon, 14 May 2007 16:46:17 -0700 (PDT) Christoph Lameter [EMAIL PROTECTED] wrote: @@ -86,6 +87,9 @@ static inline int kmalloc_index(int size */ WARN_ON_ONCE(size == 0); + if (size = (1UL KMALLOC_SHIFT_HIGH)) +

Re: slab hang on boot

2007-05-15 Thread Andrew Morton
On Tue, 15 May 2007 16:45:22 -0700 (PDT) Christoph Lameter [EMAIL PROTECTED] wrote: On Tue, 15 May 2007, Andrew Morton wrote: On Mon, 14 May 2007 16:46:17 -0700 (PDT) Christoph Lameter [EMAIL PROTECTED] wrote: @@ -86,6 +87,9 @@ static inline int kmalloc_index(int size */

Re: slab hang on boot

2007-05-15 Thread David Miller
From: Andrew Morton [EMAIL PROTECTED] Date: Tue, 15 May 2007 16:56:36 -0700 On Tue, 15 May 2007 16:45:22 -0700 (PDT) Christoph Lameter [EMAIL PROTECTED] wrote: KMALLOC_SHIFT_HIGH is not a constant but may be less than 25. It darn well better be a compile-time constant. Try to define a

Re: slab hang on boot

2007-05-15 Thread Andrew Morton
On Tue, 15 May 2007 17:14:47 -0700 (PDT) David Miller [EMAIL PROTECTED] wrote: From: Andrew Morton [EMAIL PROTECTED] Date: Tue, 15 May 2007 16:56:36 -0700 On Tue, 15 May 2007 16:45:22 -0700 (PDT) Christoph Lameter [EMAIL PROTECTED] wrote: KMALLOC_SHIFT_HIGH is not a constant but may

Re: slab hang on boot

2007-05-15 Thread Christoph Lameter
On Tue, 15 May 2007, Andrew Morton wrote: Either that newly-added test isn't needed, or those ifdefs aren't needed? The #ifdefs dont do the proper job thus the hack for Dave. The following RFC will clean things up. http://marc.info/?l=linux-kernelm=117919444827939w=2 - To unsubscribe from

Re: slab hang on boot

2007-05-15 Thread Christoph Lameter
On Tue, 15 May 2007, Andrew Morton wrote: Try to define a compile-time array size with it smarty pants :-) confusedy pants, more like. That's what we did initially and it doesn't work. This: struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1] __cacheline_aligned; is still

Re: slab hang on boot

2007-05-15 Thread David Miller
From: Andrew Morton [EMAIL PROTECTED] Date: Tue, 15 May 2007 17:29:57 -0700 This: struct kmem_cache kmalloc_caches[KMALLOC_SHIFT_HIGH + 1] __cacheline_aligned; is still there. My bad, we tried using min_t() and that's what caused the problems, that's why we open-coded the macro like it is

Re: slab hang on boot

2007-05-15 Thread Christoph Lameter
Here is the patch. It probably does not apply cleanly against Andrew's tree. I am waiting for the new tree in order to submit it. Slab allocators: Define common size limitations Currently we have a maze of configuration variables that determine the maximum slab size. Worst of all it seems to

Re: slab hang on boot

2007-05-15 Thread David Miller
From: Christoph Lameter [EMAIL PROTECTED] Date: Tue, 15 May 2007 18:00:23 -0700 (PDT) Slab allocators: Define common size limitations Thanks for doing this work Christoph, I'll test this patch out on all my sparc64 boxes, with both SLAB and SLUB, later this evening. - To unsubscribe from this

Re: slab hang on boot

2007-05-14 Thread Andrew Morton
On Mon, 14 May 2007 16:46:17 -0700 (PDT) Christoph Lameter <[EMAIL PROTECTED]> wrote: > -#define KMALLOC_SHIFT_HIGH 25 > +#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) =< 25 ? \ > + MAX_ORDER + PAGE_SHIFT - 1 : 25) Would prefer to see a lot more parentheses in

Re: slab hang on boot

2007-05-14 Thread Christoph Lameter
On Mon, 14 May 2007, David Miller wrote: > From: Meelis Roos <[EMAIL PROTECTED]> > Date: Mon, 14 May 2007 21:36:42 +0300 (EEST) > > > Sorry, I could not test the parport patch yet - I did git upgrade as of > > yesterday and the kernel hangs on boot. boot -p reveals the following > > slab

Re: slab hang on boot

2007-05-14 Thread David Miller
From: Meelis Roos <[EMAIL PROTECTED]> Date: Mon, 14 May 2007 21:36:42 +0300 (EEST) > Sorry, I could not test the parport patch yet - I did git upgrade as of > yesterday and the kernel hangs on boot. boot -p reveals the following > slab panic: Please enable SLUB to work around this for now,

Re: slab hang on boot

2007-05-14 Thread David Miller
From: Meelis Roos [EMAIL PROTECTED] Date: Mon, 14 May 2007 21:36:42 +0300 (EEST) Sorry, I could not test the parport patch yet - I did git upgrade as of yesterday and the kernel hangs on boot. boot -p reveals the following slab panic: Please enable SLUB to work around this for now, SLAB

Re: slab hang on boot

2007-05-14 Thread Christoph Lameter
On Mon, 14 May 2007, David Miller wrote: From: Meelis Roos [EMAIL PROTECTED] Date: Mon, 14 May 2007 21:36:42 +0300 (EEST) Sorry, I could not test the parport patch yet - I did git upgrade as of yesterday and the kernel hangs on boot. boot -p reveals the following slab panic: Please

Re: slab hang on boot

2007-05-14 Thread Andrew Morton
On Mon, 14 May 2007 16:46:17 -0700 (PDT) Christoph Lameter [EMAIL PROTECTED] wrote: -#define KMALLOC_SHIFT_HIGH 25 +#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) = 25 ? \ + MAX_ORDER + PAGE_SHIFT - 1 : 25) Would prefer to see a lot more parentheses in there.