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 6/11/07, Christoph Lameter <clameter@sgi.com> 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 when possible
> > misalignment was detected, but David Brownell said it was the wrong
> > way to do it and pointed at the above paragraph.
>
> Well there are various ways of doing DMA. Memory returned can be used for
> DMA but it may not be suitable for your DMA device if that device has
> issues like alignment or physical address size restrictions.

Yes, that's true. If the DMA device has such restrictions, it probably
needs to be addressed elsewhere. My goal here is to make sure that
kmalloc()'ed memory is suitable for DMA as far as the CPU and caches
are concerned.

> 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.

Haavard
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-11 21:39    [W:0.041 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site