jffs2_get_inode_nodes() very very slow
Thomas Gleixner
tglx at linutronix.de
Wed Feb 2 07:41:05 EST 2005
On Wed, 2005-02-02 at 13:26 +0100, Rudi Engelbertink wrote:
> > This converts the small nodes to bigger nodes when the data are appended
> > to log.big. I guess garbage collection should kick in quite fast and
> > clean up the small nodes. It might not totally go away, but it
> > should be much better than now. This will also give you more
> > capacity on your partition as the small nodes consist mostly of node
> > overhead.
>
> Digging through the logfile I noticed that several inodes had a lot of
> versions. Especialy the inode #737 which had 60000+ versions.
> This is a bit strange because this is a 16 byte pointer file which will
> be opened once and never closed. This should not result in 60000+ versions.
It's because JFFS2 does synchronous writes. That means, every write()
you do, is written to the FLASH immidiately. So every small log write
goes into FLASH and builds a node.
The version count is just incremented and the old nodes are declared
obsolete. I'm not sure, why the blocks are not garbage collected.
> A copy move action (cp -p file file.cp && mv file.cp file) indeed makes a big
> performance improvement.
> Will a regular close open of this file make some improvement regarding the
> stored version information of this inode. During normal operations this file,
> and some other files, never gets closed. So there will be never a 'commit'.
close / open actually does not help. Without changes to JFFS2 code only
the copy to a different file will help you.
tglx
More information about the linux-mtd
mailing list