public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Roy Spliet <r.spliet@ultimaker.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Brian Norris <computersforpeace@gmail.com>,
	Linux MTD <linux-mtd@lists.infradead.org>,
	Linux-sunxi <linux-sunxi@googlegroups.com>
Subject: Re: [RFC] Add DMA RX support for sunxi nand
Date: Sat, 13 Jun 2015 08:08:36 +0200	[thread overview]
Message-ID: <20150613080836.1df5a55a@bbrezillon> (raw)
In-Reply-To: <1434109129-28183-1-git-send-email-r.spliet@ultimaker.com>

Hi Roy,

On Fri, 12 Jun 2015 13:38:47 +0200
Roy Spliet <r.spliet@ultimaker.com> wrote:

> Following are two patches for sunxi nand DMA support. There's a whole phletora
> of reasons why these are marked RFC, including:
> - Sunxi DMA support still needs to be merged upstream
> - Sun7i NAND definitions are not merged upstream
> - No TX support
> - Bounce buffer size is fixed to 8KB, and I have no idea whether this is sane
> - No clustering of DMA requests
> - More hw features that we might want to use
> 
> Some of this can be addressed in follow-up patches, some can't. I'm just
> curious what you think.
> Motivation for sending this out anyway: on my set-up this already improves
> boot time by approx. 4s, or ~10%. This cheers me up on a sunny Friday afternoon
> in the office.

I'm really interested in having DMA support for this driver, but I'm
still wondering why we have such a difference between the non-DMA and
DMA verion, especially since you're now using a bounce buffer allocated
with dma_alloc_coherent (uncached memory region).

I guess all the perf penalty comes from the memcpy_fromio/toio (which
are useless in our case: we don't need a memory barrier after writing
each byte in the SRAM). Can you try replacing them by simple memcpys and
relaunch you tests ?

This being said, I really think the DMA approach can be interesting if
we support the 'page mode', which is able to read one full page with a
single command (and a single DMA transfer) instead of having iterate
over each ECC chunk.

Best Regards,

Boris

-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  parent reply	other threads:[~2015-06-13  6:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 11:38 [RFC] Add DMA RX support for sunxi nand Roy Spliet
2015-06-12 11:38 ` [RFC 1/2] mtd: nand: sunxi: Add RX DMA support Roy Spliet
2015-06-12 11:38 ` [RFC 2/2] dts: Add Sun7i NAND DMA definitions Roy Spliet
2015-06-13  6:08 ` Boris Brezillon [this message]
2015-06-14  8:51 ` [RFC] Add DMA RX support for sunxi nand Boris Brezillon

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=20150613080836.1df5a55a@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=r.spliet@ultimaker.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