* Q: dma requires copying into dma buffer - so what's the benefit ?
@ 2016-09-06 16:24 Ran Shalit
2016-09-06 16:54 ` Ruben Safir
0 siblings, 1 reply; 2+ messages in thread
From: Ran Shalit @ 2016-09-06 16:24 UTC (permalink / raw)
To: kernelnewbies
Hello,
There is something I don't understand about dma,
when doing memory to memory dma, it requires to cllocate dma buffer
(for example with dma_alloc_coherent),
than for each transfer we need to copy the buffer to the allocated
memory and than trigger dma transaction.
So, if it requires additional memcpy for each transaction , what's the
benefit of using dma ?
without dma:
1. copy buffer (memcpy) from source to destination
with dma:
1. copy buffer (memcpy) from source to dma buffer
2. trigger dma transaction (which shall copy the buffer eventually to
destination buffer)
Regards,
Ran
^ permalink raw reply [flat|nested] 2+ messages in thread
* Q: dma requires copying into dma buffer - so what's the benefit ?
2016-09-06 16:24 Q: dma requires copying into dma buffer - so what's the benefit ? Ran Shalit
@ 2016-09-06 16:54 ` Ruben Safir
0 siblings, 0 replies; 2+ messages in thread
From: Ruben Safir @ 2016-09-06 16:54 UTC (permalink / raw)
To: kernelnewbies
On 09/06/2016 12:24 PM, Ran Shalit wrote:
> Hello,
>
> There is something I don't understand about dma,
> when doing memory to memory dma, it requires to cllocate dma buffer
> (for example with dma_alloc_coherent),
> than for each transfer we need to copy the buffer to the allocated
> memory and than trigger dma transaction.
> So, if it requires additional memcpy for each transaction , what's the
> benefit of using dma ?
>
> without dma:
> 1. copy buffer (memcpy) from source to destination
>
> with dma:
> 1. copy buffer (memcpy) from source to dma buffer
> 2. trigger dma transaction (which shall copy the buffer eventually to
> destination buffer)
DMA hardware uses an expedited bus that frees the main memory to be
addressed for other processes.
>
> Regards,
> Ran
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com
Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-06 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 16:24 Q: dma requires copying into dma buffer - so what's the benefit ? Ran Shalit
2016-09-06 16:54 ` Ruben Safir
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.