Results of firmware JFFS2 memory reduction effort

Mitch Bradley wmb at firmworks.com
Sun May 20 04:19:30 EDT 2007


We had a couple of pathological JFFS2 images that were crashing the 
firmware's JFFS2 driver by using too much RAM when mounting the image.  
(One of them was crashing the Linux driver too until David Woodhouse 
made some improvements).

I re-engineered the firmware JFFS2 RAM data structures for compactness, 
with the following results:

Image
	RAM Before
	RAM After 	Reduction
Well-behaved, from mkfs.jffs2
	3.2 MB
	1.0 MB
	3:1
Pathological 1, has log file with >1 million small nodes (512 M NAND)
	86 MB
	3.7 MB
	23:1
Pathological 2, many deleted files with small nodes (1 G NAND)
	111 MB
	13.2 MB
	8:1


The new version is about 20% faster too, but the time is still mostly 
dominated by scanning the NAND device.

The new driver will appear in Q2C13.

(Pathological 1 is the image that was crashing the Linux driver, 
provided to me by David Woodhouse.  It resulted from some network 
testing that was dribbing data into a log file that eventually became 
large.  Pathological 2 is an image from Quanta that was causing problems 
in manufacturing test.  It resulted from repeated runs of "dbench" 
during power-fail stress testing.)









More information about the Devel mailing list