public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@logfs.org>
To: Alex Dubov <oakad@yahoo.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Support of removable MTD devices and other advanced features (follow-up from lkml)
Date: Fri, 23 May 2008 11:59:15 +0200	[thread overview]
Message-ID: <20080523095914.GA21487@logfs.org> (raw)
In-Reply-To: <806030.2681.qm@web36706.mail.mud.yahoo.com>

On Fri, 23 May 2008 02:33:30 -0700, Alex Dubov wrote:
> 
> The question is: do you really think something like this is needed at all?
> Block device layer uses all kinds of assumptions irrelevant to MTD:
> 
> 1. Most backends are very (NCQ) intelligent and very fast.
> 2. Failure rates are diminishingly small and mostly handled in hardware.
> 
> On the MTD side:
> 
> 1. Backends are dumb.
> 2. Protocols are even dumber.
> 3. Failures happen all the time.
> 4. Fully zero-copy approach is not possible (because of the occasional
> read-merge-erase-write).
> 
> That's why MTD will hardly benefit from request queues or fancy IO management
> schemes.

I have a need to spread reads/writes over N chips, with N approaching
large numbers.  And I would like to deal with such a beast as a single
mtd entity, not have a filesystem on 12odd devices at once.  So this
device should do something similar to mtdconcat and support having at
least as many outstanding requests as there are chips.

For read requests there can be literally thousands outstanding, as the
read path in a filesystem should be either lockless or extremely
fine-grained.  The only throtteling mechanisms are data dependencies,
which depend on your workload and the total amount of memory in the
system.  Or the number of threads, if reads are blocking.

An elevator is clearly pointless.  But fairness may well become and
issue, so some sort of scheduler may even make sense.  Once you think
about several gigabytes of storage attached through mtd, the
similarities to the block device layer increase.  In spite of all your
arguments being valid. :)

> There's nothing wrong with backend busy waiting to complete request. Maximum,
> your audio will jump here and there. Just don't use that driver for mp3 player
> project.

:)

> (That's why I put as a requirement that new requests must be advertised
> asynchronously, by firing a tasklet in the backend, for example. I'm following
> this approach in my xd_card driver).

I guess anything reading/writing more than 512 bytes at once can take
longer than two schedule events.  Flash may be fast compared to spinning
rust, but it's still horribly slow when compared to the cpu or even RAM.

Jörn

-- 
Invincibility is in oneself, vulnerability is in the opponent.
-- Sun Tzu

  reply	other threads:[~2008-05-23  9:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20 13:59 Support of removable MTD devices and other advanced features (follow-up from lkml) Alex Dubov
2008-05-21  6:47 ` Artem Bityutskiy
2008-05-21  8:41 ` Jörn Engel
2008-05-22  1:30   ` Alex Dubov
2008-05-22 15:10     ` Jörn Engel
2008-05-23  2:47       ` Alex Dubov
2008-05-23  5:50         ` Jörn Engel
2008-05-23  9:33           ` Alex Dubov
2008-05-23  9:59             ` Jörn Engel [this message]
2008-05-23 12:49               ` Alex Dubov
2008-05-23 13:28                 ` Jörn Engel
2008-05-24 13:12                   ` Alex Dubov
2008-05-24 17:56                     ` Jörn Engel
2008-05-25  3:41                       ` Alex Dubov
2008-05-25  7:25                         ` Jörn Engel
2008-05-25 13:30                           ` Jamie Lokier
2008-05-25 16:24                             ` Jörn Engel
2008-05-25 16:35                               ` Jamie Lokier
2008-05-25 16:55                                 ` Jörn Engel
2008-05-26  2:12                           ` Alex Dubov
2008-05-21  9:06 ` David Woodhouse
2008-05-21  9:29   ` Jörn Engel
2008-05-21 15:20     ` Alex Dubov
2008-05-21 15:22       ` David Woodhouse
2008-05-21 15:41         ` Alex Dubov
2008-05-21 20:45           ` Jörn Engel

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=20080523095914.GA21487@logfs.org \
    --to=joern@logfs.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=oakad@yahoo.com \
    /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