lkml.org 
[lkml]   [2007]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel BUG at mm/slub.c:3689!
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 heavy SMP contention.
>
> 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?

> Maybe there are other solutions to this problem, but the old SLAB
> allocator did guarantee 32-byte alignment as long as SLAB debugging
> was turned off, so setting ARCH_KMALLOC_MINALIGN seemed like the
> easiest way to get back to the old, known-working behaviour.

SLABs mininum object size is 32 thus you had no problems. I see. SLAB
does not guarantee 32 byte alignment. It just happened to work. If you
switch on CONFIG_SLAB_DEBUG you will likely get into trouble.

So I'd suggest to set up a special slab for your DMA buffers.
\
 
 \ /
  Last update: 2007-06-11 20:35    [W:1.696 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site