public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: J Freyensee <james_p_freyensee@linux.intel.com>
To: "Andrei E. Warkentin" <andrey.warkentin@gmail.com>
Cc: "Praveen G K" <praveen.gk@gmail.com>,
	"Per Förlin" <per.forlin@stericsson.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"Arnd Bergmann" <arnd@arndb.de>, "Jon Medhurst" <tixy@linaro.org>
Subject: Re: slow eMMC write speed
Date: Fri, 30 Sep 2011 17:33:20 -0700	[thread overview]
Message-ID: <4E865FD0.8010309@linux.intel.com> (raw)
In-Reply-To: <CANz0V+6zKiEs5YdpipM6iid_JwyQaN2cd5y9BKh1mXXgKpxXkA@mail.gmail.com>

On 09/30/2011 01:22 AM, Andrei E. Warkentin wrote:
> Hi James,
>
> 2011/9/29 J Freyensee<james_p_freyensee@linux.intel.com>:
>> As I've been playing around with with buffering/caching, it seems to me an
>> opportunity to simplify things in the MMC space is to eliminate the need for
>> a mmc_blk_request struct or mmc_request struct.  With looking through the
>> mmc_blk_issue_rw_rq(), there is a lot of work to initialize struct
>> mmc_blk_request brq, only to pass a struct mmc_queue variable the actual
>> mmc_wait_for_req() instead.  In fact, some of the parameters in the struct
>> mmc_blk_request member brq.mrq (of type mmc_request) wind up just pointing
>> to members in struct mmc_blk_request brq.  Granted, I totally don't
>> understand everything going on here and I haven't studied this code nearly
>> as long as others, but when I see something like this, the first thing that
>> comes up in my mind is 'elimination/simplification opportunity'.
>
> mmc_request is what is actually handled by the SD/MMC host driver -
> compact representation of
> what needs to be done (unneeded fields are NULL pointers).
> mmc_blk_request is basically the backing
> store for these fields, for the block driver. I would guess the
> mmc_request doesn't contain the fields
> because it would be inefficient (or correct me). And since there is
> quite a bit of logic behind running the
> actual MMC commands (esp. w.r.t to mrq->sbc and mrq->stop), it would
> not be a good idea to get
> rid of mmc_request and pull the strings from card drivers either.

So I have a question on write behavior.

Say mmc_blk_issue_rw_rq() is called.  Say the mmc_queue *mq variable 
passed in is a write.  Say that write is buffered, delayed into being 
sent via mmc_wait_for_req() for 5 seconds, and it's sent to 
mmc_wait_for_req() later.  Would that delay of sending the brq->mrq 
entry to mmc_wait_for_req() cause a timeout, ie:

mmc0: Timeout waiting for hardware interrupt.

??

If this is true, how would you extend the timeout?  I would not have 
expected this until mmc_wait_for_req() is called.  It appeared to me 
mmc_set_data_timeout() was just setting a variable in brq to be used 
when mmc_wait_for_req() is called.  I only see this behavior in eMMC 
cards, not MMC cards being stuck into an MMC slot of a laptop.

Thanks!

>
> Praveen:
>
> As for timings on Toshiba cards, you can search "MMC quirks relating
> to performance/lifetime." in the archives.
> There was quite a lot of very interesting data and discussions
> specifically regarding performance, and it would
> be pretty impossible and a disservice to try to summarize it :-). In
> short, I've definitely seen 100ms blips, pronounced
> by extra GC caused by unaligned accesses across allocation units (if I
> remember correctly). You could try and reduce
> the worst case, but it would make the average case worse. It's a bit
> of voodoo. Best solution is interact with your vendor
> and get suggestions on use and errata.
>
> A


-- 
J (James/Jay) Freyensee
Storage Technology Group
Intel Corporation

  reply	other threads:[~2011-10-01  0:25 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
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 [this message]
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=4E865FD0.8010309@linux.intel.com \
    --to=james_p_freyensee@linux.intel.com \
    --cc=andrey.warkentin@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linus.walleij@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox