Re: [LKML] Re: [PATCH v3] ad7877: keep dma rx buffers in seperate cache lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 19 May 2010 15:58:37 +0100
David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:

> On Wed, 2010-05-19 at 23:38 +0900, FUJITA Tomonori wrote:
> > 
> > > I don't think we need to hide the fact that some platforms have
> > > specific alignment restrictions for DMA. So if any drivers make use
> > > of the alignment, I see no problem with __dma_aligned.
> > 
> > IIRC, such was proposed several times:
> > 
> > http://www.mail-archive.com/linux-scsi@xxxxxxxxxxxxxxx/msg12633.html
> > 
> > I guess that we agreed that it's better to tell driver writers to just
> > use kmalloc. 
> 
> Perhaps -- but only a few days ago in this thread, they were being
> advised to use ____cacheline_aligned instead!

Hmm, driver writers should read DMA-API and DMA-API-HOWTO docs.


> And for this case it really does seem to make sense to keep the buffer
> in the parent structure rather than allocating it separately. The DMA
> buffers are tiny and on cache-coherent architectures it's _much_ more
> efficient just to have them in the original structure and use
> __dma_aligned.

Yeah, I think that that's a valid point (which was also discussed in
the past). However, I tend to agree on:

http://lwn.net/Articles/2270/

I think that forcing kmalloc is not that bad. Surely more code, but
the performance is not notable in most cases. IMHO, exporting cache
line thing everywhere is worse than it.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux