linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Andrei Warkentin <andreiw@motorola.com>,
	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, 1 Mar 2011 20:51:13 +0100	[thread overview]
Message-ID: <201103012051.13768.arnd@arndb.de> (raw)
In-Reply-To: <4D6D45D2.2020900@kernel.dk>

On Tuesday 01 March 2011 20:15:30 Jens Axboe wrote:
> Thanks for the recap. One way to handle this would be to have a dm
> target that ensures that requests are never built up to violate any of
> the above items. Doing splitting is a little silly, when you can prevent
> it from happening in the first place.

Ok, that sounds good. I didn't know that it's possible to prevent
bios from getting created that violate this.

I'm actually trying to do a device mapper target that does much more than
this, see
https://wiki.linaro.org/WorkingGroups/KernelConsolidation/Projects/FlashDeviceMapper
for an early draft. The design has moved on since I wrote that, but
the basic idea is still the same: all blocks get written in a way that
fills up entire 4MB segments before moving to another segment,
independent of what the logical block numbers are, and a little space
is used to store a lookup table for the logical-to-physical block mapping.

> Alternatively, a queue ->merge_bvec_fn() with a settings table could
> provide the same.

That's probably better for the common case. The device mapper target
would be useful for those that want the best case write performance,
but if I understand you correctly, the merge_bvec_fn() could be used
per block driver, so we could simply add that to the SCSI (for USB and
consumer SSD) case and MMC block drivers.

The point that this does not solve is submitting all outstanding writes
for an erase block together, which is needed to reduce the garbage
collection overhead. When you do a partial update of an erase block
(4MB typically) and then start writing to another erase block, the
drive will have to copy all data you did not write in order to free
up internal resources.

> As this is of limited scope, I would prefer having this done via a
> plugin of some sort (like a dm target).

I'm not sure what you mean with limited scope. This is certainly not
as important for the classic server environment (aside from USB boot
drives), but I assume that it is highly relevant for the a large
portion of new embedded designs as people move from raw flash to
eMMC and similar "technologies".

	Arnd

  reply	other threads:[~2011-03-01 19:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTikh4vfS7SLKAa-aUXhbTxcHzYHmBuaXj1qHHYN9@mail.gmail.com>
     [not found] ` <201102171647.46190.arnd@arndb.de>
     [not found]   ` <AANLkTimGrT_p_5xdXJv5UURPMC0cwJCPkZ=xcX5Nk=o=@mail.gmail.com>
2011-02-20 14:39     ` MMC quirks relating to performance/lifetime 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
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 [this message]
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=201103012051.13768.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=andreiw@motorola.com \
    --cc=axboe@kernel.dk \
    --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;
as well as URLs for NNTP newsgroup(s).