From: kyungsik.lee@lge.com (Kyungsik Lee)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 2/4] lib: Add support for LZ4-compressed kernel
Date: Thu, 28 Feb 2013 14:22:48 +0900 [thread overview]
Message-ID: <20130228052248.GA15148@Corona> (raw)
In-Reply-To: <20130226140051.GX27541@twin.jikos.cz>
On Tue, Feb 26, 2013 at 03:00:51PM +0100, David Sterba wrote:
> On Tue, Feb 26, 2013 at 03:24:28PM +0900, Kyungsik Lee wrote:
> > +config KERNEL_LZ4
> > + bool "LZ4"
> > + depends on HAVE_KERNEL_LZ4
> > + help
> > + Its compression ratio is worse than LZO. The size of the kernel
> > + is about 8% bigger than LZO. But the decompression speed is
> > + faster than LZO.
> > +
>
> Can you please add a sentence what lz4 actually is before you start
> comparing it with the current competitor(s)?
Yes, I will update it.
> > --- /dev/null
> > +++ b/lib/decompress_unlz4.c
> > @@ -0,0 +1,190 @@
> > +#define LZ4_CHUNK_SIZE (8<<20)
>
> Please use a less cryptic way of representing a value of 8 MB. Also,
> this is a hardcoded value that must be used on the compressor side. It's
> an upper limit, so anything below 8MB does not break decompresssion, but
> this must be somehow checked or saved along in the binary stream. You
> seem to use the lz4demo.c on the userspace side for compression, but
> this is not a standard tool nor the output format is well-defined or
> stabilized.
Yes, It will be easy to parse and extract the meta information required
for the kernel decompressor if output format is well-defined and
standardized.
> For proper use I would like to see a commandline tool similar to
> gzip/bzip2/lzop that can be packaged and shipped by distros, and the
> output format defintion.
>
> Yann has some ideas for the format
> http://fastcompression.blogspot.cz/2012/04/file-container-format-for-lz4.html
Actually, I would like to use a packaged tool by distros too.
lz4demo is what I use for compressing the kernel so far.
I name it lz4 in the patch.
> For kernel, the minimum of meta information is total compressed length,
> total uncompressed length and chunk size. I don't know if the first two
> aren't stored elsewhere in the generic kernel image headers, but chunk
> size must be specified.
Right, Currently the chunk size used in the kernel decompressor is the same
as defined in lz4demo but it should have been provided as meta
information.
Thanks,
Kyungsik
next prev parent reply other threads:[~2013-02-28 5:22 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-26 6:24 [RFC PATCH v2 0/4] Add support for LZ4-compressed kernel Kyungsik Lee
2013-02-26 6:24 ` [RFC PATCH v2 1/4] decompressor: Add LZ4 decompressor module Kyungsik Lee
2013-02-26 13:12 ` David Sterba
2013-02-27 4:38 ` Kyungsik Lee
2013-02-26 6:24 ` [RFC PATCH v2 2/4] lib: Add support for LZ4-compressed kernel Kyungsik Lee
2013-02-26 14:00 ` David Sterba
2013-02-28 5:22 ` Kyungsik Lee [this message]
2013-02-26 6:24 ` [RFC PATCH v2 3/4] arm: " Kyungsik Lee
2013-02-26 6:24 ` [RFC PATCH v2 4/4] x86: " Kyungsik Lee
2013-02-26 20:33 ` [RFC PATCH v2 0/4] " Markus F.X.J. Oberhumer
2013-02-26 20:59 ` Nicolas Pitre
2013-02-26 21:58 ` Peter Korsgaard
2013-02-26 22:09 ` Nicolas Pitre
2013-02-26 22:10 ` Russell King - ARM Linux
2013-02-27 1:40 ` Joe Perches
2013-02-27 9:56 ` Russell King - ARM Linux
2013-02-27 15:49 ` Joe Perches
2013-02-27 16:08 ` Nicolas Pitre
2013-02-27 16:31 ` Russell King - ARM Linux
2013-02-27 16:53 ` Borislav Petkov
2013-02-27 17:04 ` Joe Perches
2013-02-27 17:16 ` Nicolas Pitre
2013-02-27 17:39 ` Joe Perches
2013-02-27 17:52 ` Nicolas Pitre
2013-02-27 17:57 ` Russell King - ARM Linux
2013-02-27 17:36 ` Russell King - ARM Linux
2013-02-28 4:22 ` Joe Perches
2013-02-27 7:36 ` Kyungsik Lee
2013-02-27 9:51 ` Russell King - ARM Linux
2013-02-27 10:20 ` Johannes Stezenbach
2013-02-27 15:35 ` Nicolas Pitre
2013-02-27 13:23 ` Kyungsik Lee
2013-02-27 22:21 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130228052248.GA15148@Corona \
--to=kyungsik.lee@lge.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).