Long JFFS2 Mount time?
Marc D'Anjou
marcd at amperion.com
Fri Apr 11 09:49:26 EDT 2003
Hi,
I am using an embedded system with an IBMPPC405h and one bank (16meg)
Intel strata flash. The page size is 4k bytes. The sector size is 128k
bytes. I am using the MTD Flash driver with the JFFS2 software version
2 (newest files dated 7/2002). I'm not sure what the CVS revision number
is?
I am storing a system log inside the JFFS2. Only critical events are
stored there for debugging purposes. In general I only store 4 entries
per run time. Our system is such that it can go up and down daily. As
our log grows, the JFFS mount time appears to be growing quite a bit. It
went from less than 1 second when we first started, to up to 7 or more
minutes over days.
My concern is that the mount time could grow to hours. There is a
possibility that this has happened in a system.
To test this concern, I executed a one line script that appends 450
bytes repeatedly to the log file in the JFFS2. This was continued until
the log file size grew to 2 Meg bytes.
" cat file1.txt >> /mnt/jffs2/file.log " where
file1.txt contains 450 bytes (ascii text file).
Then I reset the system and watched how long it took to mount the JFFS2.
It took about 13 minutes to mount!!!!
I then did: "ls -l" of the directory and it took about 30 minutes to
come back???????
The second and subsequent "ls -l" was very quick (normal speed for an
ls). It acted as if all the information was cached.
My understanding is that each time we append a 450 byte entry, a new
page in the JFFS2 is obtained, it copies the previous page contents,
plus the new 450 byte entry, then marks the old page for deletion. If
this is repeated many times, the Garbage Collection Task will require
more time to resolve the JFFS2 when it mounts the next time up. There
will be many pages marked for deletion, essentially a longer trail of
pages to resolve.
Is this your understanding of the problem??
Does anyone know how to get around this problem???
Is there newer JFFS2 software available that minimize this behavior?
Marc D. D'Anjou
More information about the linux-mtd
mailing list