Skip to content

lib, initramfs: Add initramfs LZO compression

Andreas Robinson lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lib: add fast lzo decompressorlib/lzo/lzo1x_decompress_fast.c+206 -019 replies
2/2lib, initramfs: add support for LZO-compressed initramfs.include/linux/decompress/unlzo.h include/linux/lzo.h lib/Makefile +6 more+443 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] lib, initramfs: Add initramfs LZO compression

this small patchset adds support for compressing initial ramdisks into LZO (Lempel Ziv Oberhumer) format. It has been tested on x86 and x86_64. The patches apply to current git mainline.

In a pair of real-world examples, an Eee 901 boots ~120 ms faster. A high-end desktop only saves an inconsequential 35 ms.

Specs:

* LZO data decompresses in 55 - 60% of the time needed by gzip, when using the 'fast' decompressor.
* The decompressor is very small, < 2 kB on x86.
* An LZO-compressed initramfs takes 7-10% more disk space vs gzip.

Test results:

initramfs.cpio: 14174 kB 
initramfs.gz:    4657 kB
initramfs.lzo:   5007 kB
            Eee 901    Core i7 920
           SSD 30MB/s  HDD 60MB/s

            gz  lzo     gz  lzo
disk read  152  163     76   82
unpacking  247  113     95   54

----------------------------------
total 399 276 171 136

net gain 123 35

All values are milliseconds. Disk read times are estimates.

I have a patch that adds support for LZO-compressed kernels but decided to not include it now since it's only implemented for x86.

Cheers,
Andreas