public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org, Kevin Vigor <kevin@realmsys.com>
Subject: Re: [PATCH] avoid unnnecessary mtd read when read can be satisfied by write buffer
Date: Thu, 1 Jun 2006 16:49:02 +0200	[thread overview]
Message-ID: <20060601144902.GC15216@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <200606011539.35964.dwmw2@infradead.org>

On Thu, 1 June 2006 15:39:34 +0100, David Woodhouse wrote:
> On Thursday 01 June 2006 15:32, Jörn Engel wrote:
> > Not sure whether this micro optimization is worth the code.  A real
> > solution would be to have a cache for the full device.  Possibly read
> > the device through pagecache somehow (writing obviously should be
> > write-through, not write-back).  That would have a significantly
> > higher hit rate than your patch.
> 
> We haven't written to the device yet, at this point -- this is just the case 
> where the data in question exist _only_ in the wbuf, but we're actually 
> reading from the flash first _anyway_, with the current code. 

Good point.  Ignore my objections then.

> I don't think that caching the compressed nodes from the flash is going to be 
> particularly useful -- we already have the page cache for _uncompressed_ 
> data. For other things we might want to cache, such as dirents and symlinks, 
> we'll do _much_ better to store that in memory for ourselves rather than just 
> caching whole pages of the backing store for such sparse content.

My observations have been a bit different.  I've had to deal with a
semi-broken simulator, where flash accesses were unbearably slow.
Booting took about an hour.  The simulator has been fixed since, but
the broken state made some details fairly visible. :)

One of the observations was that a lot of flash is being read multiple
times.  Reads on NAND happen in page granularity, so first we have to
read pretty much everything during scan, later again when accessing
the actual files.  There is some room for savings, as RAM is faster
than flash even in the real world.

Jörn

-- 
A quarrel is quickly settled when deserted by one party; there is
no battle unless there be two.
-- Seneca

  reply	other threads:[~2006-06-01 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-31 21:50 [PATCH] avoid unnnecessary mtd read when read can be satisfied by write buffer Kevin Vigor
2006-06-01 14:32 ` Jörn Engel
2006-06-01 14:39   ` David Woodhouse
2006-06-01 14:49     ` Jörn Engel [this message]
2006-06-01 15:05       ` David Woodhouse
2006-06-01 15:27         ` Jörn Engel
     [not found] <85257180.00537972.00@pine.cspi.com>
2006-06-01 16:10 ` Kevin Vigor

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=20060601144902.GC15216@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=dwmw2@infradead.org \
    --cc=kevin@realmsys.com \
    --cc=linux-mtd@lists.infradead.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