All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: J Freyensee <james_p_freyensee@linux.intel.com>
Cc: Praveen G K <praveen.gk@gmail.com>,
	linux-mmc@vger.kernel.org, Per Forlin <per.forlin@stericsson.com>,
	Arnd Bergmann <arnd@arndb.de>, Jon Medhurst <tixy@linaro.org>
Subject: Re: slow eMMC write speed
Date: Thu, 29 Sep 2011 09:24:40 +0200	[thread overview]
Message-ID: <CACRpkdYdrfhFSfLh=Zgjox60KbYCqN+n_WdOaP2sv_mhai+iig@mail.gmail.com> (raw)
In-Reply-To: <4E839302.5020001@linux.intel.com>

On Wed, Sep 28, 2011 at 11:34 PM, J Freyensee
<james_p_freyensee@linux.intel.com> wrote:

> Now in the 3.0 kernel I know mmc_wait_for_req() has changed and the goal was
> to try and make that function a bit more non-blocking,

What has been done by Per Förlin is to add pre_req/post_req hooks
for the datapath. This will improve data transfers in general if and
only if the driver can do some meaningful work in these hooks, so
your driver needs to be patched to use these.

Per patched a few select drivers to prepare the DMA buffers
at this time. In our case (mmci.c) dma_map_sg() can be done in
parallel with an ongoing transfer.

In our case (ux500, mmci, dma40) we don't have bounce buffers
so the only thing that will happen in parallel with ongoing transfers
is L2 and L1 cache flush. *still* we see a noticeable improvement in
throughput, most in L2, but even on the U300 which only does L1
cache I see some small improvements.

I *guess* if you're using bounce buffers, the gain will be even
more pronounced.

(Per, correct me if I'm wrong on any of this...)

> with it too much because my current focus is on existing products and no
> handheld product uses a 3.0 kernel yet (that I am aware of at least).
>  However, I still see the fundamental problem is that the MMC stack, which
> was probably written with the intended purpose to be independent of the OS
> block subsystem (struct request and other stuff), really isn't independent
> of the OS block subsystem and will cause holdups between one another,
> thereby dragging down read/write performance of the MMC.

There are two issues IIRC:

- The block layer does not provide enough buffers at a time for
  the out-of-order buffer pre/post preps to make effect, I think this
  was during writes only (Per, can you elaborate?)

- Anything related to card geometries and special sectors and
  sector sizes etc, i.e. the stuff that Arnd has analyzed in detail,
  also Tixy looked into that for some cards IIRC.

Each needs to be adressed and is currently "to be done".

> The other fundamental problem is the writes themselves.  Way, WAY more
> writes occur on a handheld system in an end-user's hands than reads.
> Fundamental computer principle states "you make the common case fast". So
> focus should be on how to complete a write operation the fastest way
> possible.

First case above I think, yep it needs looking into...

Yours,
Linus Walleij

  parent reply	other threads:[~2011-09-29  7:24 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-23  5:05 slow eMMC write speed Praveen G K
2011-09-28  5:42 ` Linus Walleij
2011-09-28 19:06   ` Praveen G K
2011-09-28 19:59     ` J Freyensee
2011-09-28 20:34       ` Praveen G K
2011-09-28 21:01         ` J Freyensee
2011-09-28 21:03           ` Praveen G K
2011-09-28 21:34             ` J Freyensee
2011-09-28 22:24               ` Praveen G K
2011-09-28 22:59                 ` J Freyensee
2011-09-28 23:16                   ` Praveen G K
2011-09-29  0:57                     ` Philip Rakity
2011-09-29  2:24                       ` Praveen G K
2011-09-29  3:30                         ` Philip Rakity
2011-09-29  7:24               ` Linus Walleij [this message]
2011-09-29  8:17                 ` Per Förlin
2011-09-29 20:16                   ` J Freyensee
2011-09-30  8:22                     ` Andrei E. Warkentin
2011-10-01  0:33                       ` J Freyensee
2011-10-02  6:20                         ` Andrei E. Warkentin
2011-10-03 18:01                           ` J Freyensee
2011-10-03 20:19                             ` Andrei Warkentin
2011-10-03 21:00                               ` J Freyensee
2011-10-04  7:59                                 ` Andrei E. Warkentin
2011-10-19 23:27                                   ` Praveen G K
2011-10-20 15:01                                     ` Andrei E. Warkentin
2011-10-20 15:10                                       ` Praveen G K
2011-10-20 15:26                                         ` Andrei Warkentin
2011-10-20 16:07                                           ` Praveen G K
2011-10-21  4:45                                             ` Andrei E. Warkentin
2011-09-29  7:05         ` Linus Walleij
2011-09-29  7:33           ` Linus Walleij

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='CACRpkdYdrfhFSfLh=Zgjox60KbYCqN+n_WdOaP2sv_mhai+iig@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=arnd@arndb.de \
    --cc=james_p_freyensee@linux.intel.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=per.forlin@stericsson.com \
    --cc=praveen.gk@gmail.com \
    --cc=tixy@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.