JFFS2 is broken

Vipin Malik vipin at embeddedlinuxworks.com
Mon Aug 13 18:27:06 EDT 2001


At 02:34 PM 8/13/2001 -0400, Frederic Giasson wrote:
>Hi again Vipin,
>
>I ran your JitterTest program on my MPC860T 50MHz embedded platform.  I
>experienced worst case around 40 seconds like you did.  I think that such
>jitter time is unacceptable in a real time embedded system like mine, so I
>wonder what can be done to patch JFFS2 so it relinquish the CPU from time to
>time... I spinkled a lot of loops into JFFS2 compression files with "if(
>current->need_resched) schedule();" and the worst case was 4 seconds.

Did the 40 become 4 for the task writing to JFFS2? or was it some "other" task
that had the 40 seconds jitter?
Could you pl describe your setup. Were you running JitterTest as a POSIX 
Real Time
task or regular task?

In my test, the task writing to JFFS2 experienced the 40seconds block 
times, but
another task- not interacting with JFFS2- experienced a jitter of "only" ~50ms.



>After having spinkled the code with schedule(), I ran another application
>which accessses JFFS2 too at the same time that JitterTest, and the
>execution of my program took 17% more time, which in my opinion is
>acceptable because now JFFS2 has to cope with 2 applications accessing it at
>the same time.
>
>Do you think that something sharp and clean could be done with JFFS2 to fix
>that problem once and for all?

I hope something can be done. Those excessive blocking times are just killer!
David once mentioned that there are some obvious optimizations that can be
carried out in the JFFS2 code. Maybe he could list out his favorite ones 
and maybe
someone could volunteer to tackle them one by one.

Vipin






More information about the linux-mtd mailing list