All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: frans <fransmeulenbroeks@gmail.com>
Cc: linux-kernel@vger.kernel.org, dwmw2@infradead.org
Subject: Re: [PATCH] create option to compress initramfs within the kernel
Date: Sat, 22 Nov 2008 19:32:11 -0600	[thread overview]
Message-ID: <200811221932.12518.rob@landley.net> (raw)
In-Reply-To: <alpine.DEB.1.00.0811221817560.3675@frans-desktop>

On Saturday 22 November 2008 11:30:13 frans wrote:
> Below is a patch to make compression of the initramfs image optional.
> Sumbitted to LKML as there is no MAINTAINER listed for initramfs.
>
> Rationale is that if you create a compressed kernel image (e.g. by
> make bzImage) it is not very efficient and useful to compress initramfs
> as the initramfs will be compressed anyway when the kernel image is
> compressed.

Actually it saves intermediate space (the cpio archive and the decompressed 
ramfs coexist during the decompression, until the kernel can free the cpio 
archive), so it does serve a purpose.  (Given cache effects leaving it 
compressed may actually wind up being faster on modern CPUs because it dirties 
fewer pages.)

It also eats CPU, which is at more of a premium than memory on some little 
battery powered wind-up boxes.  But I'd be happier seeing some actual 
benchmark numbers on a device that would actually _notice_ this change.

> @@ -257,6 +258,9 @@ while [ $# -gt 0 ]; do
>  			default_list="$arg"
>  			${dep_list}default_initramfs
>  			;;
> +		"-c")	# compress
> +			compress=1
> +			;;

You're changing the default behavior for people who run this script directly.  
Just FYI.

> --- a/usr/Kconfig
> +++ b/usr/Kconfig
> @@ -44,3 +44,14 @@ config INITRAMFS_ROOT_GID
>  	  owned by group root in the initial ramdisk image.
>
>  	  If you are not sure, leave it set to "0".
> +
> +config INITRAMFS_COMPRESS
> +	bool "Compress initramfs image"
> +	default y
> +	help
> +	  If you want a compressed initramfs image in your kernel say y
> +	  If you do not want your initramfs image to be compressed say n.
> +	  A compressed initramfs is generally not useful if you also have a
> +	  compressed kernel (vmlinuz, bzImage).

This should probably be in the CONFIG_EMBEDDED menu.

Rob

  reply	other threads:[~2008-11-23  1:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-22 17:30 [PATCH] create option to compress initramfs within the kernel frans
2008-11-23  1:32 ` Rob Landley [this message]
     [not found]   ` <ac9c93b10811250143u3763a810g1c6211ba9afef531@mail.gmail.com>
2008-11-25  9:45     ` Frans Meulenbroeks

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=200811221932.12518.rob@landley.net \
    --to=rob@landley.net \
    --cc=dwmw2@infradead.org \
    --cc=fransmeulenbroeks@gmail.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.