From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Ludovic Desroches <ludovic.desroches@atmel.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] dmaengine: xdmac: Add scatter gathered memset support
Date: Thu, 16 Jul 2015 16:11:05 +0200 [thread overview]
Message-ID: <20150716141105.GJ28632@lukather> (raw)
In-Reply-To: <20150716120154.GN5086@localhost>
[-- Attachment #1: Type: text/plain, Size: 1655 bytes --]
Hi Vinod,
> > + /*
> > + * The scatterlist API gives us only the address and
> > + * length of each elements.
> > + *
> > + * Unfortunately, we don't have the stride, which we
> > + * will need to compute.
> > + *
> > + * That make us end up in a situation like this one:
> > + * len stride len stride len
> > + * +-------+ +-------+ +-------+
> > + * | N-2 | | N-1 | | N |
> > + * +-------+ +-------+ +-------+
> > + *
> > + * We need all these three elements (N-2, N-1 and N)
> > + * to actually take the decision on whether we need to
> > + * queue N-1 or reuse N-2.
> > + *
> > + * We will only consider N if it is the last element.
> > + */
>
> Why do you need stride?
>
> This is scatterlist so the computation of stride sounds odd here. Ideally
> you should take the scatterlist and program the lli for controller.
Because it is sub-optimal if the length and stride are equals from one
descriptors to another. The XDMAC is able to repeat any given
descriptor a given number of time (which is one by default), which
means that if the parameters of the transfer don't change, we simply
have to increment the number of time the descriptor has to be used,
instead of creating a new one that the controller will have to fetch.
In the non-optimal case (ie the length and/or stride change from one
scatterlist element to another), we simply fallback to a one LLI per
scatter list element.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-07-16 14:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 10:19 [PATCH 0/2] dmaengine: Add scatter-gathered memset support Maxime Ripard
2015-07-06 10:19 ` [PATCH 1/2] dmaengine: Add scatter-gathered memset Maxime Ripard
2015-07-06 10:19 ` [PATCH 2/2] dmaengine: xdmac: Add scatter gathered memset support Maxime Ripard
2015-07-16 12:01 ` Vinod Koul
2015-07-16 14:11 ` Maxime Ripard [this message]
2015-07-17 3:09 ` Vinod Koul
2015-07-21 12:19 ` Maxime Ripard
2015-07-17 6:22 ` [PATCH 0/2] dmaengine: Add scatter-gathered " Ludovic Desroches
2015-08-05 5:30 ` 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=20150716141105.GJ28632@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=boris.brezillon@free-electrons.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
--cc=nicolas.ferre@atmel.com \
--cc=thomas.petazzoni@free-electrons.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