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: Wed, 23 Feb 2011 17:09:04 +0100 [thread overview]
Message-ID: <201102231709.05036.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTinfWiRaGruP8cM44c62T8svVOKsFhi4Dmg8yzEa@mail.gmail.com>
On Wednesday 23 February 2011, Andrei Warkentin wrote:
> That sounds good! In fact, for any quirks enabled for a particular
> card, I'll expose the tuneables through sysfs attributes, something
> like /sys/block/mmcblk0/device/quirks/quirk-name/attr-names.
>
> Quirks will have block intervals and access size intervals over which
> they are valid, along with any other quirk-specific parameter.
> Interval overlap will not be allowed for quirks in the same operation
> type (r/w/e). The goal here is to make the changes to issue_*_rq as
> small as possible, and not to pollute block.c at all with the quirks
> stuff. Quirks are looked up inside issue_*_rq based on req type and
> [start,end) interval. The resulting found quirks structure will
> contain a callback used inside issue_*_rq to modify mmc block request
> structures prior to generating actual MMC commands.
>
> Quirks consist of a callback called inside of mmc issue_*_rq,
> configurable attributes, and the sysfs interface. Quirk groups are
> defined per-card. At card insertion time, a matching quirk group is
> found, and is enabled. The quirk group enable function then enables
> the relevant quirks with the right parameters (adds them to per
> mmc_blk_data quirk interval tree). Some sane defaults for the tunables
> are used. If the tunables are modified through sysfs, care is taken
> that an interval overlap never happens, otherwise the tunable is not
> modified and a kernel error message is logged.
>
> I hope I explained the tentative idea clearly... Thoughts?
I would hope that the quirks can be simpler than this still, without
the need to call any function pointers while using the device, or
quirk specific sysfs directories.
What I meant is to have a single function pointer that can get
called when detecting a specific known card. All this function
does is to set values and flags that we can export either through
common attributes of block devices (e.g. preferred erase size),
or attributes specific to mmc devices (e.g. the toshiba hack, as
a bool attribute).
An obvious attribute would be the minimum size of an atomic
page update. By default this could be 32KB, because any device
should support that (FAT32 cannot have larger clusters). A
card specific quirk can set it to another value, like 8KB, 16KB
or 64KB, and file systems or other tools like mkfs can optimize
for this value.
I would like the flags like "don't submit requests spanning
this boundary" and "make all writes below this size" to be defined
in terms of the regular sizes we already know about, like the
page size or the erase size.
Arnd
next prev parent reply other threads:[~2011-02-23 16:09 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
2011-02-23 10:19 ` Andrei Warkentin
2011-02-23 16:09 ` Arnd Bergmann [this message]
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=201102231709.05036.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