From: Arnd Bergmann <arnd@arndb.de>
To: Andrei Warkentin <andreiw@motorola.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-fsdevel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
linux-mmc@vger.kernel.org
Subject: Re: MMC quirks relating to performance/lifetime.
Date: Tue, 22 Feb 2011 18:00:16 +0100 [thread overview]
Message-ID: <201102221800.17196.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTi=ZOUrNoT1W1n3d+9KTMewKZ3kxo71AQsas9OpD@mail.gmail.com>
On Tuesday 22 February 2011, Andrei Warkentin wrote:
> On Sun, Feb 20, 2011 at 8:39 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > E.g. the I/O scheduler can also make sure that we always submit all
> > blocks from the start of one erase unit (e.g. 4 MB) to the end, but
> > not try to merge requests across erase unit boundaries. It can
> > also try to group the requests in aligned power-of-two sized chunks
> > rather than merging as many sectors as possible up to the maximum
> > request size, ignoring the alignment.
>
> I agree. These are common things that affect any kind of flash
> storage, and it belongs in the I/O scheduler as simple tuneables. I'll
> see if I can figure my way around that...
>
> What belongs in mmc card driver are tunable workarounds for MMC/SD
> brokeness. For example - needing to use 8K-spitted reliable writes to
> ensure that a 64KB access doesn't wind up in the 4MB buffer B (as to
> improve lifespan of the card.) But you want a waterline above which
> you don't do this anymore, otherwise the overall performance will go
> to 0 - i.e. there is a need to balance between performance and
> reliability, so the range of access size for which the workaround
> works needs to be runtime controlled, as it's potentially different.
> Another example (this one is apparently affecting Sandisk) - do
> special stuff for block erase, since the card violates spec in that
> regard (touch ext_csd instead of argument, I believe). A different
> example might be turning on reliable writes for WRITE_META (or all)
> blocks for a certain partition (but I just made that up... ).
Yes, makes sense.
> You could put the entire MMC block policy interface through an API
> usable by system integrators - i.e. you would really only care for
> tuning the MMC parameters if you're creating a device around an emmc.
>
> Idea (1). One idea is to keep the "policies" from my previous mail.
> Policies are registered through platform-specific code. The policies
> could be then matched for enabling against a specific block device by
> manfid/date/etc at the time of mmc_block_alloc... For removable media
> no one would fiddle with the tunable parameters anyway, unless there
> was some global database of cards and workarounds and a daemon or some
> such to take care of that... Probably don't want to add such baggage
> to the kernel.
>
> Idea (2). There is probably no need to overcomplicate. Just add a
> platform callback (something like int
> (*mmc_platform_block_workaround)(struct request *, struct
> mmc_blk_request *)). This will be usable as-is for R/W accesses, and
> the discard code will need to be slightly modified.
>
> Do you think there is any need for runtime tuning of the MMC
> workarounds (disregarding ones that really belong in the I/O
> scheduler)? Should the workarounds be simply platform callbacks, or
> should they be something heftier ("policies")?
The platform hook seems the wrong place, because you might use
the same chip in multiple platforms, and a single platform might
have a large number of different boards, all of which require
separate workarounds.
A per-card quirk table does not seem so bad, we have that in
other subsystems as well. I wouldn't necessarily make it
a list of possible quirks, but rather a __devinit function that
is called for a new card on insertion, in order to tweak various
parameters.
Arnd
next prev parent reply other threads:[~2011-02-22 17:00 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AANLkTikh4vfS7SLKAa-aUXhbTxcHzYHmBuaXj1qHHYN9@mail.gmail.com>
2011-02-08 21:38 ` MMC quirks relating to performance/lifetime Wolfram Sang
2011-02-09 8:37 ` Linus Walleij
2011-02-09 9:13 ` Arnd Bergmann
2011-02-11 22:33 ` Andrei Warkentin
2011-02-12 17:05 ` Arnd Bergmann
2011-02-12 17:33 ` Andrei Warkentin
2011-02-12 18:22 ` Arnd Bergmann
2011-02-18 1:10 ` Andrei Warkentin
2011-02-18 13:44 ` Arnd Bergmann
2011-02-18 19:47 ` Andrei Warkentin
2011-02-18 22:40 ` Andrei Warkentin
2011-02-18 23:17 ` Andrei Warkentin
2011-02-19 11:20 ` Arnd Bergmann
2011-02-20 5:56 ` Andrei Warkentin
2011-02-20 15:23 ` Arnd Bergmann
2011-02-22 7:05 ` Andrei Warkentin
2011-02-22 16:49 ` Arnd Bergmann
2011-02-19 9:54 ` Arnd Bergmann
2011-02-20 4:39 ` Andrei Warkentin
2011-02-20 15:03 ` Arnd Bergmann
2011-02-22 6:42 ` Andrei Warkentin
2011-02-22 16:42 ` Arnd Bergmann
2011-02-11 23:23 ` Linus Walleij
2011-02-12 10:45 ` Arnd Bergmann
2011-02-12 10:59 ` Russell King - ARM Linux
2011-02-12 16:28 ` Arnd Bergmann
2011-02-12 16:37 ` Russell King - ARM Linux
2011-02-11 22:27 ` Andrei Warkentin
2011-02-12 18:37 ` Arnd Bergmann
2011-02-13 0:10 ` Andrei Warkentin
2011-02-13 17:39 ` Arnd Bergmann
2011-02-14 19:29 ` Andrei Warkentin
2011-02-14 20:22 ` Arnd Bergmann
2011-02-14 22:25 ` Andrei Warkentin
2011-02-15 17:16 ` Arnd Bergmann
2011-02-17 2:08 ` Andrei Warkentin
2011-02-17 15:47 ` Arnd Bergmann
2011-02-20 11:27 ` Andrei Warkentin
2011-02-20 14:39 ` Arnd Bergmann
2011-02-22 7:46 ` Andrei Warkentin
2011-02-22 17:00 ` Arnd Bergmann [this message]
2011-02-23 10:19 ` Andrei Warkentin
2011-02-23 16:09 ` Arnd Bergmann
2011-02-23 22:26 ` Andrei Warkentin
2011-02-24 9:24 ` Arnd Bergmann
2011-02-25 11:02 ` Andrei Warkentin
2011-02-25 12:21 ` Arnd Bergmann
2011-03-01 18:48 ` Jens Axboe
2011-03-01 19:11 ` Arnd Bergmann
2011-03-01 19:15 ` Jens Axboe
2011-03-01 19:51 ` Arnd Bergmann
2011-03-01 21:33 ` Andrei Warkentin
2011-03-02 10:34 ` Andrei Warkentin
2011-03-05 9:23 ` Andrei Warkentin
[not found] ` <201102111551.15508.arnd@arndb.de>
[not found] ` <20110308065911.GC1357@ucw.cz>
2011-03-08 14:03 ` Arnd Bergmann
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=201102221800.17196.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=andreiw@motorola.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.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