lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1274281117.6930.10190.camel@macbook.infradead.org>
Date:	Wed, 19 May 2010 15:58:37 +0100
From:	David Woodhouse <dwmw2@...radead.org>
To:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Cc:	npiggin@...e.de, jw@...ix.com, marc@...silica.com,
	vapier.adi@...il.com, dmitry.torokhov@...il.com, cl@...ux.com,
	penberg@...helsinki.fi, mpm@...enic.com, akpm@...ux-foundation.org,
	os@...ix.com, Michael.Hennerich@...log.com,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	dg@...ix.com, osw@...ix.com, rientjes@...gle.com,
	dbrownell@...rs.sourceforge.net, grant.likely@...retlab.ca,
	chris@...kel.net, Piet.Delaney@...silica.com
Subject: Re: [LKML] Re: [PATCH v3] ad7877: keep dma rx buffers in seperate
 cache lines

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@vger.kernel.org/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!

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.

-- 
dwmw2

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ