[PATCH v1] mtd-utils:mkfs.ubifs: Add support for LZ4HC compression

Elie De Brauwer eliedebrauwer at gmail.com
Mon Oct 7 11:59:19 PDT 2013


All,

After some more experimentation and some input from Konstantin
attached is a new version of a patch to mtd-utils which adds LZ4HC
support to mkfs.ubifs:

What's new:
 - favor_lz4hc is changed to toggle between lz4hc/lzo rather than
lz4hc/zlib in order to come up with a mode which should be both flash
and cpu friendly, mainly since our experiments showed that lz4hc isn't
a free lunch by default (read: probably starts paying of at larger
block lengths than what we can offer it now).

Some tests of this new mode at different favor-percents shows that for
my little rootfs that with a favor percent of 10%, lz4hc gets used in
about 17% of the cases with a footprint which is within a meg's range
of what lzo would've done to it.

edb at lapelidb:~/mtd-utils$ for x in 20 15 10 7 5 3; do  echo $x; sudo
mkfs.ubifs/mkfs.ubifs  -X $x -x favor_lz4hc -m 2048 -e 126976 -c 744
-d /tmp/k/ /tmp/imag.favor_lz4hc_$x | sort | uniq -c; ls -hal
/tmp/imag.favor_lz4hc_$x ; done
20
   9996 lz4hc
    224 lzo
-rw-r--r-- 1 root root 28M Oct  7 20:48 /tmp/imag.favor_lz4hc_20
15
   5913 lz4hc
   4307 lzo
-rw-r--r-- 1 root root 26M Oct  7 20:48 /tmp/imag.favor_lz4hc_15
10
   1722 lz4hc
   8498 lzo
-rw-r--r-- 1 root root 25M Oct  7 20:49 /tmp/imag.favor_lz4hc_10
7
   1091 lz4hc
   9129 lzo
-rw-r--r-- 1 root root 25M Oct  7 20:49 /tmp/imag.favor_lz4hc_7
5
    793 lz4hc
   9427 lzo
-rw-r--r-- 1 root root 25M Oct  7 20:49 /tmp/imag.favor_lz4hc_5
3
    566 lz4hc
   9654 lzo
-rw-r--r-- 1 root root 25M Oct  7 20:49 /tmp/imag.favor_lz4hc_3


my 2 cents
E.

-- 
Elie De Brauwer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mtd-utils-mkfs.ubifs-Add-support-for-LZ4HC-compressi.patch
Type: application/octet-stream
Size: 54514 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20131007/553aa2b2/attachment-0001.obj>


More information about the linux-mtd mailing list