From: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Andy Shevchenko
<andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dmaengine <dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v1 1/1] spi: dw-mid: set DMA burst on memory side
Date: Tue, 12 Apr 2016 19:32:49 +0530 [thread overview]
Message-ID: <20160412140249.GI2274@localhost> (raw)
In-Reply-To: <1460462195.6620.100.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
On Tue, Apr 12, 2016 at 02:56:35PM +0300, Andy Shevchenko wrote:
> On Tue, 2016-04-12 at 01:34 +0100, Mark Brown wrote:
> > On Mon, Apr 11, 2016 at 07:30:12PM +0300, Andy Shevchenko wrote:
> >
>
> +Vinod and dmaengine@
>
> > >
> > > To optimize amount of bus writes on memory side set burst to be the
> > > same amount
> > > of data on both sides.
> > >
> > > + txconf.src_maxburst = 4 * dws->dma_width;
> > > txconf.dst_maxburst = 16;
> > This doesn't seem to do what the subject says (at least not always,
> > it'll align for a dma_width of 4)?
>
> Thanks you didn't apply the patch.
>
> I think the approach itself is wrong.
>
> The peripheral drivers usually have no idea and shouldn't know about DMA
> engine memory side characteristics (bus width, bursts, etc).
These are typically you system characterstics, like 32 bit or 64 bit bus to
memory and rest (burst etc) should be maximum as the data will go from/to
dmaengine FIFO to/from memory, so you would want to push as fast as possible
Said that, maximun burst with 32bit wide should be saner value in modern
systems.
>
> This should be fixed in certain DMA engine drivers.
>
> Also, as you may have noticed when we get maximum length of the segment
> we take into consideration what DMA device supports. Many of them report
> something like 2^n - 1, which is apparently unaligned and thus in the
> poorly written DMA driver leads to performance degradation.
Which Intel controller supports 2^n - 1? AFAIK the dw and idma don't.
> Looks like all Intel related DMA drivers should be fixed (HSU, iDMA64,
> dw_dmac).
>
> Vinod, am I right?
>
> --
> Andy Shevchenko <andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> Intel Finland Oy
>
--
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-04-12 14:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 16:30 [PATCH v1 1/1] spi: dw-mid: set DMA burst on memory side Andy Shevchenko
[not found] ` <1460392212-101116-1-git-send-email-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-12 0:34 ` Mark Brown
[not found] ` <20160412003409.GN3351-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-04-12 11:56 ` Andy Shevchenko
[not found] ` <1460462195.6620.100.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-12 14:02 ` Vinod Koul [this message]
2016-04-12 16:06 ` Andy Shevchenko
[not found] ` <1460477161.6620.120.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-19 13:33 ` 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=20160412140249.GI2274@localhost \
--to=vinod.koul-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).