RE: [PATCH 16/16] dma-mapping: use exact allocation in dma_alloc_contiguous

From
David Laight <hidden>
Date
2019-06-14 15:01:33
Also in
dri-devel, intel-gfx, linux-arm-kernel, linux-iommu, linux-media, linux-mm, linux-rdma, linux-s390, linux-wireless, lkml
Reply to
'Christoph Hellwig', 2019-06-14
From: 'Christoph Hellwig'
Sent: 14 June 2019 15:50
To: David Laight
On Fri, Jun 14, 2019 at 02:15:44PM +0000, David Laight wrote:
quoted
Does this still guarantee that requests for 16k will not cross a 16k boundary?
It looks like you are losing the alignment parameter.
The DMA API never gave you alignment guarantees to start with,
and you can get not naturally aligned memory from many of our
current implementations.
Hmmm...
I thought that was even documented.

I'm pretty sure there is a lot of code out there that makes that assumption.
Without it many drivers will have to allocate almost double the
amount of memory they actually need in order to get the required alignment.
So instead of saving memory you'll actually make more be used.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Thread (37 messages) 37 messages, 9 authors, last reply 2019-07-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help