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 07:50:06 +0200 [thread overview]
Message-ID: <20080523055005.GA20264@logfs.org> (raw)
In-Reply-To: <323976.43299.qm@web36707.mail.mud.yahoo.com>
On Thu, 22 May 2008 19:47:02 -0700, Alex Dubov wrote:
>
> >
> > But nothing below the FTL should ever know about a logical block at all.
> > Why pass it on?
>
> Media class specific backend must know it, to populate media's oob structure.
> TI's smartmedia adapter, for example, wants to know it itself (it has a
> hardware register for it).
Interesting. Do you have a spec for that?
I would have expected two kinds of controllers. "Smart" ones that
essentially export a block device interface and do all FTL work
themselves and dumb ones that allow raw flash access and require and FTL
in software. Didn't know there were mixtures of the two.
> > We can replace the data pointer with a struct bio_vec. In fact, I am
> > wondering whether we could just use a struct bio instead of struct
> > mtd_request.
> >
>
> Passing the whole struct bio is an overshoot for what we want to support. It
> has plenty of functionality that to my opinion would never be supported by dumb
> flash controllers.
After having a closer look at it I tend to agree. Nevertheless there
are tons of similarities between block devices and mtd and I would like
them to become as similar as reasonably possible. So right now I'd
create a struct fio (flash io) and copy any fields that make sense for
both from struct bio.
> I thought, something simple would be enough, as long as it can handle buffer
> fragmentation and give the backend access to the actual struct page for mapping
> operation. It doesn't matter if this is a scatterlist or bio_vec (they are
> mostly the same). What's matter is an ability to obtain several chunks of the
> buffer in some not too obtrusive way.
>
> Host controller will get a buffer chunk, and set up a dma into it. When it
> catches dma boundary event, it'll get another chunk, while still in the
> interrupt handler (as much as needed). If controller happens to have a real sg
> dma, it can call mtd_get_buf_sg several times in advance to populate the sg
> table.
>
> Controllers lacking dma capability can do exactly the same using mtd_get_buf.
Makes sense. And one hopes that most controllers don't require busy
waits and either send an interrupt or allow setting a timer as a poor
man's interrupt.
Jörn
--
Homo Sapiens is a goal, not a description.
-- unknown
next prev parent reply other threads:[~2008-05-23 5:50 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 [this message]
2008-05-23 9:33 ` Alex Dubov
2008-05-23 9:59 ` Jörn Engel
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=20080523055005.GA20264@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