Re: kernel BUG at mm/slub.c:3689!

2007-06-12 Thread Haavard Skinnemoen
On Tue, 12 Jun 2007 10:55:12 +0200 Haavard Skinnemoen <[EMAIL PROTECTED]> wrote: > On Mon, 11 Jun 2007 20:16:31 -0700 (PDT) > Christoph Lameter <[EMAIL PROTECTED]> wrote: > > > > and I can't do that over VPN. I'll test it first thing in the morning. > > > > Here is a more general fix > > Sorry,

Re: kernel BUG at mm/slub.c:3689!

2007-06-12 Thread Haavard Skinnemoen
On Mon, 11 Jun 2007 20:16:31 -0700 (PDT) Christoph Lameter <[EMAIL PROTECTED]> wrote: > > and I can't do that over VPN. I'll test it first thing in the morning. > > Here is a more general fix Sorry, that didn't work either. One problem is that you're using ARCH_KMALLOC_MIN_ALIGN instead of ARCH_

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Christoph Lameter
> and I can't do that over VPN. I'll test it first thing in the morning. Here is a more general fix SLUB: minimum alignment fixes If ARCH_KMALLOC_MIN_ALIGN is set to a value greater than 8 (SLUBs smallest kmalloc cache) then SLUB may generate duplicate slabs in sysfs (yes again). No arch sets

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Håvard Skinnemoen
On 6/11/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: Trouble is that ARCH_KMALLOC_MINALIGN is in bytes whereas we would need a shift value for KMALLOC_MIN_SHIFT. Ah, of course. Hrm...I just thought I had an idea, but it wouldn't work... Does the latest patch work? I'm sorry, but I haven

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Christoph Lameter
On Mon, 11 Jun 2007, Håvard Skinnemoen wrote: > > We should probably make the minimum slab size dependent on > > ARCH_KMALLOC_MINALIGN. There is no point in having smaller slabs anyways. > > They will all have the same size. > > Sounds reasonable to me. Trouble is that ARCH_KMALLOC_MINALIGN is i

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Håvard Skinnemoen
On 6/11/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: On Mon, 11 Jun 2007, Håvard Skinnemoen wrote: > I think it's best to ensure that memory returned by kmalloc() actually > can be used for DMA. I used to work around this problem in the SPI > controller driver by using a temporary DMA buffer

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Christoph Lameter
On Mon, 11 Jun 2007, Håvard Skinnemoen wrote: > > > > > > It's not about performance at all, it's about DMA buffers allocated > > > using kmalloc() getting corrupted. Imagine this: > > > > Uhhh... How about using a separate slab for the DMA buffers? > > If there were just a few, known drivers th

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Håvard Skinnemoen
On 6/11/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: On Mon, 11 Jun 2007, Håvard Skinnemoen wrote: > > Note that I do not get why you would be aligning the objects to 32 bytes. > > Increasing the smallest cache size wastes a lot of memory. And it is > > usually advantageous if multiple relat

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Christoph Lameter
On Mon, 11 Jun 2007, Håvard Skinnemoen wrote: > > Note that I do not get why you would be aligning the objects to 32 bytes. > > Increasing the smallest cache size wastes a lot of memory. And it is > > usually advantageous if multiple related objects are in the same cacheline > > unless you have he

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Håvard Skinnemoen
On 6/11/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: Ok. Drop the patch and use this one instead. This one avoids the use of smaller slabs that cause the conflict. The first slab will be sized 32 bytes instead of 8. Thanks, I'll test it tomorrow. Note that I do not get why you would be al

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Christoph Lameter
On Mon, 11 Jun 2007, Håvard Skinnemoen wrote: > On 6/11/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: > > Ahhh... I see its the same phenomenon as before but triggered by > > a different cause. > > > > If you set the align to 32 then the first kmalloc slabs of size > > > > 8 > > 16 > > 32 > >

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Håvard Skinnemoen
On 6/11/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: Ahhh... I see its the same phenomenon as before but triggered by a different cause. If you set the align to 32 then the first kmalloc slabs of size 8 16 32 are all of the same size which leads to duplicate files in sysfs. Yes, that see

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Christoph Lameter
On Mon, 11 Jun 2007, Håvard Skinnemoen wrote: > On 6/11/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: > > On Mon, 11 Jun 2007, Haavard Skinnemoen wrote: > > > > > While trying to get SLUB debugging to not break DMA on AVR32, I ran > > > into this: > > > > This is a known bug in 2.6.22-rc2/rc3

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Håvard Skinnemoen
On 6/11/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: On Mon, 11 Jun 2007, Haavard Skinnemoen wrote: > While trying to get SLUB debugging to not break DMA on AVR32, I ran > into this: This is a known bug in 2.6.22-rc2/rc3. Which version are you running? 2.6.22-rc4. I did a pull from Linus'

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Christoph Lameter
On Mon, 11 Jun 2007, Haavard Skinnemoen wrote: > While trying to get SLUB debugging to not break DMA on AVR32, I ran > into this: This is a known bug in 2.6.22-rc2/rc3. Which version are you running? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a messag

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Håvard Skinnemoen
On 6/11/07, Paul Mundt <[EMAIL PROTECTED]> wrote: On Mon, Jun 11, 2007 at 04:19:26PM +0200, Haavard Skinnemoen wrote: > I think the combination that triggered this bug was: > * CONFIG_SLUB_DEBUG=y > * ARCH_KMALLOC_MINALIGN=32 > * slub_debug not set at the command line > ARCH_KMALLOC_MINALIG

Re: kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Paul Mundt
On Mon, Jun 11, 2007 at 04:19:26PM +0200, Haavard Skinnemoen wrote: > I think the combination that triggered this bug was: > * CONFIG_SLUB_DEBUG=y > * ARCH_KMALLOC_MINALIGN=32 > * slub_debug not set at the command line > ARCH_KMALLOC_MINALIGN and ARCH_SLAB_MINALIGN are both in bytes (ARCH_KM

kernel BUG at mm/slub.c:3689!

2007-06-11 Thread Haavard Skinnemoen
While trying to get SLUB debugging to not break DMA on AVR32, I ran into this: (...) adding slab: name=kmalloc-64 size=64 objsize=64 adding slab: name=kmalloc-32 size=32 objsize=32 adding slab: name=kmalloc-16 size=32 objsize=16 kobject_add failed for :032 with -EEXIST, don't try to register t