Re: How to efficiently handle DMA and cache on ARMv7 ? (was Is get_user_pages() enough to prevent pages from being swapped out ?)

2009-08-26 Thread David Xiao
On Tue, 2009-08-25 at 16:17 -0700, Laurent Pinchart wrote: On Wednesday 26 August 2009 00:02:48 David Xiao wrote: On Tue, 2009-08-25 at 05:53 -0700, Steven Walter wrote: On Thu, Aug 6, 2009 at 6:25 PM, Russell King - ARM Linuxli...@arm.linux.org.uk wrote: [...] As far

Re: How to efficiently handle DMA and cache on ARMv7 ? (was Is get_user_pages() enough to prevent pages from being swapped out ?)

2009-08-25 Thread David Xiao
On Tue, 2009-08-25 at 05:53 -0700, Steven Walter wrote: On Thu, Aug 6, 2009 at 6:25 PM, Russell King - ARM Linuxli...@arm.linux.org.uk wrote: [...] As far as userspace DMA coherency, the only way you could do it with current kernel APIs is by using get_user_pages(), creating a scatterlist

Re: How to efficiently handle DMA and cache on ARMv7 ? (was Is get_user_pages() enough to prevent pages from being swapped out ?)

2009-08-11 Thread David Xiao
On Tue, 2009-08-11 at 02:31 -0700, Catalin Marinas wrote: On Thu, 2009-08-06 at 22:59 -0700, David Xiao wrote: The V7 speculative prefetching will then probably apply to DMA coherency issue in general, both kernel and user space DMAs. Could this be addressed by inside the dma_unmap_sg

Re: How to efficiently handle DMA and cache on ARMv7 ? (was Is get_user_pages() enough to prevent pages from being swapped out ?)

2009-08-07 Thread David Xiao
On Fri, 2009-08-07 at 13:28 -0700, Russell King - ARM Linux wrote: The kernel direct mapping maps all system (low) memory with normal memory cacheable attributes. So using vmalloc, dma_alloc_coherent, using pages in userspace all create duplicate mappings of pages. If we do want to

Re: How to efficiently handle DMA and cache on ARMv7 ? (was Is get_user_pages() enough to prevent pages from being swapped out ?)

2009-08-06 Thread David Xiao
On Thu, 2009-08-06 at 06:06 -0700, Laurent Pinchart wrote: Hi Ben, On Thursday 06 August 2009 13:46:19 Ben Dooks wrote: On Thu, Aug 06, 2009 at 12:08:21PM +0200, Laurent Pinchart wrote: [snip] The second problem is to ensure cache coherency. As the userspace application will read