Re: [PATCH] init: bzip2 or lzma -compressed kernels and initrds

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alain Knaff
Date: Saturday, September 6, 2008 - 3:59 pm

Leon Woestenberg wrote:

Oops, sorry for that. Actually the Kconfig text is correct. On
decompression, Lzma is faster than bzip2 but slower than gzip:

Compressor	Compression	Decompression	Size
gzip -9		1,01s		0,11s		833069
lzma -9		3,43s		0,24s		705125
bzip2 -9	2,88s		0,38s		777706

On compression, lzma is actually slowest of the 3, but that should be of
little concern, as this happens only once, whereas decompression happens
many times (on each boot).

So, overall lzma looks like the best (acceptable decompression speed,
best decompression ratio). I only included Bzip2 because it's much
better known than lzma.


Thanks for your interest and warm welcome :)


Unfortunately, I didn't have any such machine available for testing, so
I just for Intel 32/64.

However, the changes in the Assembly part (head_32.S and head_64.S) are
trivial, so should be easy to port. The only change to these files is
the offset where the uncompressed size of the file may be found (4 bytes
from the end for gzip, and 5 from the start for lzma).

misc.c, where the bulk of the "architecture-specific" change is, is
actually not that architecture-specific, and could maybe be moved to a
common part? Diff'ing the boot/compressed/misc.c's of various
architectures shows (at first glance) mostly version differences: some
architectures get some changes/enhancements earlier than others. It's as
if the various architectures were stuck at some different points in the
past as compared to Intel...

most of the other files are architecture-independant anyways (the stuff
in lib/ and init/)

Alain
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] init: bzip2 or lzma -compressed kernels and in ..., Alain Knaff, (Sat Sep 6, 3:59 pm)
Re: [PATCH] init: bzip2 or lzma -compressed kernels and in ..., Frans Meulenbroeks, (Mon Sep 15, 5:46 am)
Re: [PATCH] init: bzip2 or lzma -compressed kernels and in ..., Leon Woestenberg, (Fri Sep 26, 11:53 am)