[PATCH] block2mtd oops in erase function.

Jörn Engel joern at lazybastard.org
Wed Feb 21 11:02:18 EST 2007


On Wed, 21 February 2007 10:42:49 -0500, Jason Lunz wrote:
> 
> A raw read of the underlying block device takes 54s, so jffs2 isn't
> adding any significant overhead anymore. It was when readahead was
> in use.

That is a bit surprising.  JFFS2 has some optimizations to skip empty
blocks after some bytes.  This is where readahead really hurt - JFFS2
would skip and readahead would read the skipped data anyway.  Now I can
see that JFFS2 has some overhead over plain reading the device, but it
is unusual that overhead and optimizations cancel each other out so
perfectly.

> The only way to increase performance at this point is to make it so that
> jffs2 doesn't need to read the entire device at mount time. Is this what
> erase block summaries do?

Yes.  The idea is to only read the summary at the end of an erase block.
If the summary does not exist, it will fall back to linear scanning of
the block, afaik.

If you enable CONFIG_JFFS2_SUMMARY, it should work for you.  Of course,
your filesystem needs the summary, so you either have to do the
backup&restore procedure or apply sumtool (is that its name?) to your
images.

Jörn

-- 
Joern's library part 3:
http://inst.eecs.berkeley.edu/~cs152/fa05/handouts/clark-test.pdf




More information about the linux-mtd mailing list