copy_to_user speed from dma_alloc_coherent vs. kmalloc buffer

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

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux