From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Vinod Koul <vinod.koul@intel.com>, Jun Nie <jun.nie@linaro.org>,
Lars-Peter Clausen <lars@metafoo.de>
Cc: Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Petr Cvek <petr.cvek@tul.cz>
Subject: Re: [PATCH 1/3] dmaengine: virt-dma: don't always free descriptor upon completion
Date: Sat, 12 Sep 2015 15:08:34 +0200 [thread overview]
Message-ID: <878u8bu6nh.fsf@belgarion.home> (raw)
In-Reply-To: <1441539654-19055-1-git-send-email-robert.jarzmik@free.fr> (Robert Jarzmik's message of "Sun, 6 Sep 2015 13:40:52 +0200")
Robert Jarzmik <robert.jarzmik@free.fr> writes:
> This patch attempts to enhance the case of a transfer submitted multiple
> times, and where the cost of creating the descriptors chain is not
> negligible.
>
> This happens with big video buffers (several megabytes, ie. several
> thousands of linked descriptors in one scatter-gather list). In these
> cases, a video driver would want to do :
> - tx = dmaengine_prep_slave_sg()
> - dma_engine_submit(tx);
> - dma_async_issue_pending()
> - wait for video completion
> - read video data (or not, skipping a frame is also possible)
> - dma_engine_submit(tx)
> => here, the descriptors chain recalculation will take time
> => the dma coherent allocation over and over might create holes in
> the dma pool, which is counter-productive.
> - dma_async_issue_pending()
> - etc ...
>
> In order to cope with this case, virt-dma is modified to prevent freeing
> the descriptors upon completion if DMA_CTRL_REUSE flag is set in the
> transfer.
>
> This patch is a respin of the former DMA_CTRL_ACK approach, which was
> reverted due to a regression in audio drivers.
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Hi Jun, Lars-Peter and Vinod,
The revert of the former patch of this type, 8c8fe97b2b8a ("Revert "dmaengine:
virt-dma: don't always free descriptor upon completion"") broke pxa_dma driver.
The reason behind is that pxa_dma was designed, upon transfer submission (in
pxad_tx_submit()), to "move" the virtual descriptor to the submitted list,
rather than adding it at its tail (because it was previously on the allocated
list).
As a consequence, the list_head is not initialized, pxa_dma fails, and the
current status is that pxa_dma Oopses in linux-next, and therefore in Linus's
tree once the merge window is closed.
I'd really like to have this patch as the fix, ie. that at transfer preparation
in vchan_tx_prep(), the virtual descriptor is added on "allocated" list tail.
But to be sure there is no regression on other platforms, I need a test,
especially from someone who suffered from the former version of this patch
(where we had DMA_CTRL_ACK instead of DMA_CTRL_REUSE).
Could anybody give it a try, as I need a fix to go in the early -rc of v4.3
please ?
Cheers.
--
Robert
next prev parent reply other threads:[~2015-09-12 13:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-06 11:40 Robert Jarzmik
2015-09-06 11:40 ` [PATCH 2/3] dmaengine: enable DMA_CTRL_REUSE Robert Jarzmik
2015-09-06 11:40 ` [PATCH 3/3] dmaengine: pxa_dma: declare transfer are reusable Robert Jarzmik
2015-09-12 13:08 ` Robert Jarzmik [this message]
2015-09-16 19:20 ` [PATCH 1/3] dmaengine: virt-dma: don't always free descriptor upon completion Robert Jarzmik
2015-09-24 17:26 ` Vinod Koul
2015-09-24 19:48 ` Robert Jarzmik
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=878u8bu6nh.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--cc=daniel@zonque.org \
--cc=dmaengine@vger.kernel.org \
--cc=haojian.zhuang@gmail.com \
--cc=jun.nie@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petr.cvek@tul.cz \
--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
all inboxes | Powered by JetHome®