From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: <linux@arm.linux.org.uk>, <linux-kernel@vger.kernel.org>,
<dmaengine@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-omap@vger.kernel.org>, <tony@atomide.com>
Subject: Re: [PATCH v2 6/6] dmaengine: omap-dma: Support for LinkedList transfer of slave_sg
Date: Mon, 8 Aug 2016 16:58:15 +0300 [thread overview]
Message-ID: <76993999-9638-7c46-a85a-e2ed2ef1b8a0@ti.com> (raw)
In-Reply-To: <20160808054226.GR9681@localhost>
On 08/08/16 08:42, Vinod Koul wrote:
> On Wed, Jul 20, 2016 at 11:50:32AM +0300, Peter Ujfalusi wrote:
>> sDMA in OMAP3630 or newer SoC have support for LinkedList transfer. When
>> LinkedList or Descriptor load feature is present we can create the
>> descriptors for each and program sDMA to walk through the list of
>> descriptors instead of the current way of sDMA stop, sDMA reconfiguration
>> and sDMA start after each SG transfer.
>> By using LinkedList transfer in sDMA the number of DMA interrupts will
>> decrease dramatically.
>> Booting up the board with filesystem on SD card for example:
>> W/o LinkedList support:
>> 27: 4436 0 WUGEN 13 Level omap-dma-engine
>>
>> Same board/filesystem with this patch:
>> 27: 1027 0 WUGEN 13 Level omap-dma-engine
>>
>> Or copying files from SD card to eMCC:
>> 2.1G /usr/
>> 232001
>>
>> W/o LinkedList we see ~761069 DMA interrupts.
>> With LinkedList support it is down to ~269314 DMA interrupts.
>>
>> With the decreased DMA interrupt number the CPU load is dropping
>> significantly as well.
>
> Interesting, I would have counted the throughput of DMA by using time for
> transfer and not really interrupts and CPU load. With LL mode, you get a
> big performance boost due to starting next transaction by hardware without
> waiting for CPU intervention and yes side effect is lesser interrupts and
> load :)
I did throughput test as well, it was slightly faster, but not the boost I was
hoping for.
The copy of the /usr (2.1G) - 5 runs average:
w/o linked list: 7:30 mins
with this patch: 7:23 mins
The limiting factor here is the SD card I have used. But the board was way
more responsible during heavy I/O tasks, like running 'emerge --sync' I can
still use the board.
>> @@ -743,6 +863,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg(
>> struct omap_desc *d;
>> dma_addr_t dev_addr;
>> unsigned i, es, en, frame_bytes;
>> + bool ll_failed = false;
>> u32 burst;
>>
>> if (dir == DMA_DEV_TO_MEM) {
>> @@ -818,16 +939,47 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg(
>> */
>> en = burst;
>> frame_bytes = es_bytes[es] * en;
>> +
>> + if (sglen >= 2)
>> + d->using_ll = od->ll123_supported;
>
> No upperbound on length? Does the hardware support any lengths?
No, we don't have upper limit, we can link as many sg as we could allocate
from the pool.
--
Péter
next prev parent reply other threads:[~2016-08-08 13:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 8:50 [PATCH v2 0/6] dmaengine:omap-dma: Linked List transfer for slave_sg Peter Ujfalusi
2016-07-20 8:50 ` [PATCH v2 1/6] dmaengine: omap-dma: Simplify omap_dma_start_sg parameter list Peter Ujfalusi
2016-07-20 8:50 ` [PATCH v2 2/6] dmaengine: omap-dma: Simplify omap_dma_callback Peter Ujfalusi
2016-07-20 8:50 ` [PATCH v2 3/6] dmaengine: omap-dma: Dynamically allocate memory for lch_map Peter Ujfalusi
2016-07-20 8:50 ` [PATCH v2 4/6] dmaengine: omap-dma: Add more debug information when freeing channel Peter Ujfalusi
2016-07-20 8:50 ` [PATCH v2 5/6] dmaengine: omap-dma: Use pointer to omap_sg in slave_sg setup's loop Peter Ujfalusi
2016-07-20 8:50 ` [PATCH v2 6/6] dmaengine: omap-dma: Support for LinkedList transfer of slave_sg Peter Ujfalusi
2016-08-08 5:42 ` Vinod Koul
2016-08-08 13:58 ` Peter Ujfalusi [this message]
2016-08-10 17:32 ` [PATCH v2 0/6] dmaengine:omap-dma: Linked List transfer for slave_sg Vinod Koul
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=76993999-9638-7c46-a85a-e2ed2ef1b8a0@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=tony@atomide.com \
--cc=vinod.koul@intel.com \
/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
Powered by JetHome