Hi,

I have a driver where I do memory to memory DMA between GPMC and SDRAM. Adding a read function, I found that copy_to_user from a dma_alloc_coherent buffer is significantly slower than from a kmalloc'd one.

Looking at arch/arm/include/asm/pgtable.h I suspect this difference in speed is due to the fact that the dma_alloc_coherent buffer is unbuffered.

What are my options (besides using mmap)?

* Reserve a portion of memory at boot time to be used as the DMA destination buffer, use ioremap_cached + manual cache flush as needed? * Turn on buffering for the DMA destination buffer for the duration of the copy_to_user call, then turn it off again (and flush it from the cache)?
* Something else entirely?


This is on a 3730, on Linux 2.6.32.

Thanks,
Orjan

--
Orjan Friberg
FlatFrog Laboratories AB
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to