dma-mapping: support for DMA_ATTR_NON_CONSISTENT DMA attribute

Sylvain Munaut s.munaut at
Sun Jun 28 13:32:41 PDT 2015


I've found this patch from several month ago :

And I find it very useful, but I couldn't find why it wasn't merged ?
What was the problem with it ?

In my use case, I need to allocate fairly large buffers (holding video
data) and the hardware requires them to be contiguous.

I ensure the consistency by using the DMA streaming API
(dma_sync_single_for_{cpu,device}) and so when the buffer is "owned"
by the CPU, I definitely want cached access because coherent memory
speed is just abysmal ... (about 10x slower to read the whole buffer

Since the buffer is > 4M, I can't rely on kmalloc or alloc_pages to
allocate it and dma_alloc_attrs with this patch applied does exactly
what I need.

Did I miss something ? Is there another way to do what I need ? (well
beside reimplementing the whole dma_alloc_attr logic myself ...)



More information about the linux-arm-kernel mailing list