lzo optimizations already included?
Ah, but of course.
Is everyone aware that there has been some optimizations done on lzo fairly recently. I'm not sure how to describe it best, but here are the merges in linux-next:
lzo optimizations
unaligned access
The comment below is what is interesting, some pretty nice speedups is seen on a variety of platforms including arm.
I could not find anymention of this on
our github repo (cm11) which I assume is the branch we are using. It could just be me not finding the commits though, but if we are not actually using those lzo updates, shouldn't we?
I mean, if zram is used by default, it would make sense for it to be used as efficiently as possible.
I don't know the policies that are used with regards to what is possible to use, but imho, these patches make sense.
Please let me know where my argument is invalid, and I'll shut up! =)
"Summary:
========
Update the Linux kernel LZO compression and decompression code to the
current upstream version which features significant performance
improvements on modern machines.
Some *synthetic* benchmarks:
============================
x86_64 (Sandy Bridge), gcc-4.6 -O3, Silesia test corpus, 256 kB block-size:
compression speed decompression speed
LZO-2005 : 150 MB/sec 468 MB/sec
LZO-2012 : 434 MB/sec 1210 MB/sec
i386 (Sandy Bridge), gcc-4.6 -O3, Silesia test corpus, 256 kB block-size:
compression speed decompression speed
LZO-2005 : 143 MB/sec 409 MB/sec
LZO-2012 : 372 MB/sec 1121 MB/sec
armv7 (Cortex-A9), Linaro gcc-4.6 -O3, Silesia test corpus, 256 kB block-size:
compression speed decompression speed
LZO-2005 : 27 MB/sec 84 MB/sec
LZO-2012 : 44 MB/sec 117 MB/sec
**LZO-2013-UA : 47 MB/sec 167 MB/sec
Legend:
LZO-2005 : LZO version in current 3.8 kernel (which is based on
the LZO 2.02 release from 2005)
LZO-2012 : updated LZO version available in linux-next
**LZO-2013-UA : updated LZO version available in linux-next plus experimental
ARM Unaligned Access patch. This needs approval
from some ARM maintainer ist NOT YET INCLUDED."
Andrew Morton <akpm@linux-foundation.org> acks it and says:
"There's a new LZ4 on the block which is even faster than the sped-up
LZO, but various filesystems and things use LZO"
* tag 'lzo-update-signature-20130226' of git://github.com/markus-oberhumer/linux:
crypto: testmgr - update LZO compression test vectors
lib/lzo: Update LZO compression to current upstream version
lib/lzo: Rename lzo1x_decompress.c to lzo1x_decompress_safe.c"
If anyone bothered to read this entire thing down to here, I'll make an addendum. Lz4 is even faster than lzo, but compresses a bit worse, as mentioned in the very end of the comments. If I wanted my zram to be as fast as possible, that is what I would implement. But seeing as lz4 is recently new, maybe that is left as an exercise to custom kernels until it is more proven. I know a few already do.