linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: klondike <klondike@xiscosoft.sinip.es>
To: P J P <ppandit@redhat.com>
Cc: linux-kernel@vger.kernel.org, Paul Bolle <pebolle@tiscali.nl>
Subject: Re: [PATCH] initramfs: allow again choice of the embedded compression algorithm
Date: Tue, 30 Sep 2014 01:42:51 +0200	[thread overview]
Message-ID: <5429EE7B.1070404@xiscosoft.sinip.es> (raw)
In-Reply-To: <alpine.LFD.2.10.1409291328290.15448@wniryva.cad.erqung.pbz>

El 29/09/14 10:08, P J P escribió:
>    Hello Klondike,
Hi!
> +-- On Thu, 25 Sep 2014, klondike wrote --+
> | Despite embedding an uncompressed initramfs, a user may want to allow for a
> | compressed extra initramfs to be passed using the rd system, for example to
> | boot a recovery system. Commit 9ba4bcb645898d562498ea66a0df958ef0e7a68c
> | ("initramfs: read CONFIG_RD_ variables for initramfs compression") broke
> | that behavior by making the choice based on CONFIG_RD_* instead of adding
> | CONFIG_INITRAMFS_COMPRESSION_LZ4. Saddly, CONFIG_RD_* is also used to
> | choose the supported RD compression algorithms by the kernel and a user may
> | want to suppport more than one.
>
>   Ie. on embedded systems they use CONFIG_INITRAMFS_COMPRESSION_* options to 
> compress ram disk and on other platforms they use CONFIG_RD_* options?
No, instead CONFIG_RD_* defines the compression formats supported by the
kernel when parsing an initramfs (either embedded into the kernel or
passed by the bootloader) whilst one of CONFIG_INITRAMFS_COMPRESSION_*
is used to choose the one that will be used on the initramfs embedded
into the kernel.

Just to make sure we are using the same terms, a system using a kernel
with an embedded intramfs isn't necessarily an embedded system, for
example I use such on my Gentoo systems which involve both servers and
Desktops.
> | As a result the following options are added or readed affecting the embedded
> | initramfs compression:
> | INITRAMFS_COMPRESSION_NONE Do no compression
> | INITRAMFS_COMPRESSION_GZIP Compress using gzip
> | INITRAMFS_COMPRESSION_BZIP2 Compress using bzip2
> | INITRAMFS_COMPRESSION_LZMA Compress using lzma
> | INITRAMFS_COMPRESSION_XZ Compress using xz
> | INITRAMFS_COMPRESSION_LZO Compress using lzo
> | INITRAMFS_COMPRESSION_LZ4 Compress using lz4
>
>   I haven't tested the patch yet, but does it preserve the CONFIG_RD_* 
> options' functionality?
Yes, except choosing the compression algorithm for the embedded
initramfs (which will default to gzip). For older kernels this means the
user will now experience the intended behaviour, for newer ones it means
that users using expert settings and an embedded initramfs will be asked
for the compression algorithm to be used (with the list of those
available depending on the CONFIG_RD_* options choosen), whilst normal
users will default to gzip compression.
> Would unifying the two options into one be a good idea?
I'm not a Kconfig wizard (more like a wizzard) so I'm not sure if such a
thing is possible. Basically we need a way to choose compression methods
supported (more to enforce the appropriate dependencies according to my
understanding of the code) and a way to choose the particular one used
for the embedded initramfs, as basing this choice in the selected method
may not always be a good idea (in my setups using a non compressed
embedded initramfs works best but external initramfs used for example to
do recovery may be compressed using xz). Of course on an embedded system
with serious memory constrains it may make more sense for example to
compress the embedded initramfs to reduce memory usage during boot. So
if you have suggestions on how to do this with a single option please
share them :)

klondike

  reply	other threads:[~2014-09-29 23:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25  4:47 [PATCH] initramfs: allow again choice of the embedded compression algorithm klondike
2014-09-29  8:08 ` P J P
2014-09-29 23:42   ` klondike [this message]
2016-09-27 19:30 ` [PATCH v2 1/2] " klondike
2016-09-27 19:31   ` [PATCH v2 2/2] " klondike
2016-09-27 20:32   ` [PATCH v3 1/2] initramfs: Select builtin initram compression algorithm on KConfig instead of Makefile klondike
     [not found]   ` <57EAD3BC.9050802@klondike.es>
2016-09-27 20:32     ` [PATCH v3 2/2] initramfs: Allow again choice of the embedded initram compression algorithm klondike
2016-10-21 21:21       ` Andrew Morton
2016-10-21 21:29         ` Francisco Blas Izquierdo Riera (klondike)
2017-05-20 22:30       ` [v3, " Florian Fainelli
2017-05-21  2:48         ` Florian Fainelli

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=5429EE7B.1070404@xiscosoft.sinip.es \
    --to=klondike@xiscosoft.sinip.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=ppandit@redhat.com \
    /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).