Okay, so I got some jffs2 results. First the baseline: default kernel
setup, printks enabled, serial console. What I tested was to mount a
freshly created rootfs. I used the 20080116 snapshot, with a size of
47038464 bytes. So all times below are for the "mount" operation.

As expected, this takes a looong time, with the kernel complaining
bitterly about "Empty flash at ... ends at ...": about 49.5s.

Now, we can cheat and turn kernel messages off. This brings the mount
time down to about 39.2s, or 80% of the initial value.

Then I enabled hardware ECC. Note that the code for this is quite
broken, but as long as there are no real errors, this doesn't matter :-)
This brought it down to about 29.9s, or 60% of the first result.

Then I was getting a bit worried about those error messages. Turns
out the the file system is generated with completely wrong parameters,
i.e., the Flash parameters of the GTA01, not the GTA02. Fixing this
yielded an image of 50069504 (+6.4%), and a mount time of about 8.4s,
or roughly 17% of the initial mess.

Tony, your estimate of -80% was pretty accurate :-)

Finally, I gave summaries a try. They increased the image by 3.4%
and reduced mount time to about 1.2s, or 2.4% of the original time.


The correct mkfs command would be something like this:

mkfs.jffs2 --eraseblock=0x20000 --pagesize=0x800 --no-cleanmarkers \
  --little-endian --pad -o rootfs.jffs2 -d ./rootfs

To add the summaries, something like this:

sumtool --eraseblock=0x20000 --no-cleanmarkers \
  --littleendian --pad -i rootfs.jffs2 -o srootfs.jffs2


Below is my detailed log. Note that also unmounting takes some time,
something in the order of 8 seconds after the first mount. But that
just seem to be some dirty buffers (probably summary updates) that
eventually get flushed in the background.

So, my conclusion this far is that jffs2 can do quite well if we just
let it. I think summaries are enough of a win that we want to us them,
particularly since they're cheap to use and don't break any assumptions
we make.

- Werner

---------------------------------- cut here -----------------------------------

# ls -l openmoko-devel-image-fic-gta02.jffs2
-rw-r--r--  1 root root 47038464 Jan 16 08:53 
openmoko-devel-image-fic-gta02.jffs2

time scp openmoko-devel-image-fic-gta02.jffs2 192.168.0.1:
        real    0m52.649s       user    0m1.464s        sys     0m1.268s
time flash_eraseall -q /dev/mtd5
        real    0m 1.26s        user    0m 0.00s        sys     0m 1.27s
time nandwrite -p -q /dev/mtd5 openmoko-devel-image-fic-gta02.jffs2
        real    0m 24.27s       user    0m 0.05s        sys     0m 24.22s
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 49.49s       user    0m 0.00s        sys     0m 47.01s
time umount /mnt
        real    0m 8.59s        user    0m 0.00s        sys     0m 0.02s
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 49.35s       user    0m 0.00s        sys     0m 46.90s
time umount /mnt
        real    0m 0.03s        user    0m 0.00s        sys     0m 0.02s

BASELINE:       mount 49.5s, umount 0-9s

echo 0 >/proc/sys/kernel/printk
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 39.19s       user    0m 0.00s        sys     0m 36.67s
time umount /mnt
        real    0m 0.02s        user    0m 0.00s        sys     0m 0.01s

SILENT:         mount 39.2s

time scp openmoko-devel-image-fic-gta02.jffs2 192.168.0.1:
        real    0m52.644s       user    0m1.504s        sys     0m1.008s
time flash_eraseall -q /dev/mtd5
time nandwrite -p -q /dev/mtd5 openmoko-devel-image-fic-gta02.jffs2
        real    0m 22.22s       user    0m 0.05s        sys     0m 22.18s
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 40.10s       user    0m 0.00s        sys     0m 37.70s
time umount /mnt
        real    0m 2.19s        user    0m 0.01s        sys     0m 0.01s
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 40.28s       user    0m 0.00s        sys     0m 37.67s
time umount /mnt
        real    0m 0.02s        user    0m 0.01s        sys     0m 0.01s
echo 0 >/proc/sys/kernel/printk
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 29.92s       user    0m 0.01s        sys     0m 27.56s
time umount /mnt
        real    0m 0.05s        user    0m 0.00s        sys     0m 0.02s

HWECC+SILENT:   mount 29.9s

# rm openmoko-devel-image-fic-gta02.jffs2
# mkfs.jffs2 --eraseblock=0x20000 --pagesize=0x800 ...
# echo 7 >/proc/sys/kernel/printk
# ls -l rootfs.jffs2
-rw-r--r--  1 root root 50069504 Jan 16 21:37 rootfs.jffs2

time scp rootfs.jffs2 192.168.0.1:
        real    0m55.898s       user    0m1.532s        sys     0m1.336s
time flash_eraseall -q /dev/mtd5
time nandwrite -p -q /dev/mtd5 rootfs.jffs2
        real    0m 23.64s       user    0m 0.09s        sys     0m 23.55s
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 8.34s        user    0m 0.00s        sys     0m 8.33s
time umount /mnt
        real    0m 8.46s        user    0m 0.01s        sys     0m 0.01s
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 8.34s        user    0m 0.00s        sys     0m 8.33s
time umount /mnt
        real    0m 0.13s        user    0m 0.00s        sys     0m 0.01s

HWECC+MKFS:     mount 8.4s

# rm rootfs.jffs2
# sumtool ...
# ls -l srootfs.jffs2
-rw-r--r--  1 root root 51773440 Jan 16 21:39 srootfs.jffs2

time scp srootfs.jffs2 192.168.0.1:
        real    0m57.818s       user    0m1.576s        sys     0m1.404s
time flash_eraseall -q /dev/mtd5
time nandwrite -p -q /dev/mtd5 srootfs.jffs2
        real    0m 24.45s       user    0m 0.04s        sys     0m 24.41s
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 1.13s        user    0m 0.00s        sys     0m 1.12s
time umount /mnt
        real    0m 6.68s        user    0m 0.01         sys     0m 0.01s
time mount -t jffs2 /dev/mtdblock5 /mnt
        real    0m 1.14s        user    0m 0.00s        sys     0m 1.13s
time umount /mnt
        real    0m 0.03s        user    0m 0.00s        sys     0m 0.02s

HWECC+MKFS+SUM: mount 1.2s

Reply via email to