writing to jffs2 is so slow?
Joakim Tjernlund
Joakim.Tjernlund at lumentis.se
Fri Sep 6 17:20:22 EDT 2002
----- Original Message -----
From: "David Woodhouse" <dwmw2 at infradead.org>
To: "Xiaogeng (Shawn) Jin" <xjin at redswitch.com>
Cc: "Jörn Engel" <joern at wohnheim.fh-wedel.de>; "Kenneth Johansson" <kenneth.johansson at etx.ericsson.se>; "Mtd"
<linux-mtd at lists.infradead.org>
Sent: den 6 september 2002 20:54
Subject: Re: writing to jffs2 is so slow?
>
> xjin at redswitch.com said:
> > > Try eraseall from the utils.
> > > With that, jffs2 just writes the erase markers to flash, 12 bytes per
> > > erase block.
>
> No, JFFS2 cannot trust that 'empty' blocks really have been properly
> erased, and must erase them again, writing a 'cleanmarker' node to them
> when the erase is complete.
>
> > Well, that's just what I did. Then making a first directory takes 2
> > minutes.
>
> JFFS2 is busy erasing every block on the file system. You have to wait
> until it's done before you can write.
I think that can be fixed(or at least better). Instead of eraseing all blocks first and
then write cleanmarker to those blocks, make it erase one block and write
cleanmarker erase the next block and write it's cleanmarker and so on.
That way you will free up erase blocks as they become ready and you don't have to watch
the use % in df slowly raise to 100% and the suddenly drop to the real usage.
Jocke
More information about the linux-mtd
mailing list