lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 16 Jul 2015 16:11:05 +0200
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	Vinod Koul <vinod.koul@...el.com>
Cc:	Nicolas Ferre <nicolas.ferre@...el.com>,
	Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
	Ludovic Desroches <ludovic.desroches@...el.com>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	Boris Brezillon <boris.brezillon@...e-electrons.com>,
	dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/2] dmaengine: xdmac: Add scatter gathered memset support

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

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ