Subject: Re: Using DMA for memcpy()
To: Jason Hecker <jhecker@www.wireless.org.au>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-perform
Date: 07/29/2003 07:14:47
On Tuesday, July 29, 2003, at 01:27  AM, Jason Hecker wrote:

>> I very much doubt you would get any improvement, in fact it would
>> be hard to not lose out badly.
>
> I've been mulling over it a bit more since I posted the query, and 
> you're
> right.  Cache coherency would be a big problem, as would scheduling the
> DMA or trying to implement some piecemeal sharing mechanism so no one
> process is waiting too long to use the controller.  Forget I asked.  ;)
>
> Better off just using the DMA controller as needed as some sort of
> background copier.

There is a "dmover" framework that handles these sorts of things.  It 
is the case that for random memcpy(), using the DMA controller would 
have too much overhead.  But using it for things like pmap_copy_page() 
and pmap_zero_page() might be a good idea.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>