From: "Timur Tabi" <timur@freescale.com>
To: Bruce_Leonard@selinc.com
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Using DMA
Date: Fri, 7 Nov 2008 15:46:42 -0600 [thread overview]
Message-ID: <ed82fe3e0811071346u291fa477s2147affcc0f8ef42@mail.gmail.com> (raw)
In-Reply-To: <OFDAB4AD6D.6B393411-ON882574FA.007560E7-882574FA.007634F1@selinc.com>
On Fri, Nov 7, 2008 at 3:31 PM, <Bruce_Leonard@selinc.com> wrote:
> I'm not sure if I need something as complicated as sound/soc/fsl/fsl_dma.c
> or not. Maybe you can offer an opinion. The NAND flash in our product is
> our backing storage, i.e., our hard drive. We know that we're going to be
> storing away system status at about a 1 second rate and in the future
> we'll probably end up storing collected data at a very high rate, so we're
> potentially going to be doing a LOT of data movement to the NAND. I'm
> still not clear on the adma stuff, so I'm not sure if a "single-shot
> one-way transfer" is appropriate or not. Seems like I'd waste a lot of
> time setting up and tearing down the DMA channel.
>
> So, do I need something complicated?
The Async DMA code is very much like an "offload memcpy". The Elo
control will handle the memcpy while the host CPU can do something
else. Keep in mind that while the Elo is transferring data, the
memory bus will be saturated.
Whether or not using async dma is worth the effort can only be
determined by profiling the code. Either it's better, or it's not.
There's no real way to tell in advance.
The advantage of using async DMA over memcpy is that you don't have to
worry about large memcpy operations blocking the CPU and causing apps
the kernel and apps to stall while your driver is copying data. So
even if overall performance drops, latency will improve and
the system will appear to be faster. The drawback is that async dma
is more complicated than plain old memcpy. Since the dma is
asynchronous, you'll need to register a callback function which gets
notified when the Elo has completed the DMA transfer. That's a very
different design than memcpy.
--
Timur Tabi
Linux kernel developer at Freescale
next prev parent reply other threads:[~2008-11-07 21:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 2:07 Using DMA Bruce_Leonard
2008-11-06 18:29 ` Scott Wood
2008-11-06 18:36 ` Bill Gatliff
2008-11-06 20:58 ` Bruce_Leonard
2008-11-06 21:42 ` Bill Gatliff
2008-11-07 15:43 ` Timur Tabi
2008-11-07 21:31 ` Bruce_Leonard
2008-11-07 21:46 ` Timur Tabi [this message]
2008-11-07 22:12 ` Bruce_Leonard
2008-11-07 22:28 ` Timur Tabi
2008-11-07 22:37 ` Bruce_Leonard
2008-11-09 3:26 ` Bill Gatliff
2008-11-09 3:25 ` Bill Gatliff
2008-11-10 0:09 ` Bruce_Leonard
2008-11-10 14:35 ` Timur Tabi
2008-11-10 17:58 ` Bruce_Leonard
2008-11-11 9:09 ` Rajasekaran Kaliyaperumal, Chennai
2008-11-11 10:22 ` Porting Linux to 8051 [ was:Re: Using DMA ] Martyn Welch
2008-11-10 22:06 ` Using DMA Bruce_Leonard
2008-11-11 14:51 ` Timur Tabi
2008-11-11 18:19 ` Bruce_Leonard
2008-11-11 19:22 ` Timur Tabi
2008-11-11 21:46 ` Bruce_Leonard
2008-11-11 21:54 ` Timur Tabi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed82fe3e0811071346u291fa477s2147affcc0f8ef42@mail.gmail.com \
--to=timur@freescale.com \
--cc=Bruce_Leonard@selinc.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).