jffs2 gabrage collector runs even if partition is mounted RO

566 Views Asked by At

I use JFFS2 partition as the root one mounting it in the command line (and fstab) as RO. It is Montavista 5.0 linux (2.6.18).

Everything works, except that when linux arrives to my application it is busy for about 15s by jffs2_gcd_mtd3 with 98% CPU time. This is unacceptable in my case.

I searched linux code and saw that GC thread is started ONLY when mounted RW, but in my case it starts nonetheless!

I tried to mount it rw and unmount afterwords, but...

Thanks ahead.

UPDATE: The statement about GC daemon is wrong - I saw it on error. The main cause of the issue is the VERY VERY slow work of JFFS2 in comparison to YAFFS2 I had previously. Just to compare - my ELF formatted application of 14MiB was loaded from YAFFS2 in 2-2.5 sec, while from JFFS2 it takes about 8 sec.!!! This made me think that there is something blocking Linux...

Now, the question si changed to: what can make the JFFS2 to be SO DREADFULLY slow!?!? Again, the partition is mounted RO!

1

There are 1 best solutions below

0
On

OK, the answer is as following:
It takes A LOT of time for JFFS2 to mount the partition of 120MiB - something about 10 seconds on ARM5 running at 300MHz. Nothing helps here - sumtools, unmount with R/W (to write the summary).
I solved the issue by:
- not including the unnecessary/unused space into Linux partitions;
- dividing the rest of 70MiB into two - one 55MiB with all Linux stuff, one of 15MiB with my application and its files.

This solved the problem. The time is about 2-3s