public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
	Matt Mackall <mpm@selenic.com>,
	Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Subject: Re: [PATCH] skip initramfs check
Date: Mon, 21 Nov 2005 09:04:46 -0600	[thread overview]
Message-ID: <200511210904.46495.rob@landley.net> (raw)
In-Reply-To: <20051121062350.GA24381@logos.cnet>

On Monday 21 November 2005 00:23, Marcelo Tosatti wrote:
> Hi Rob,
> > Query: is the problem that a big initramfs image is being unpacked more
> > than once, or is unpacking an empty initramfs image (134 bytes) causing a
> > significant delay?
>
> The problem is a big non-initramfs RAMDISK image (used for root mountpoint
> on this particular embedded platform), that is decompressed more than once:
>
> - during the initramfs check, which fails because it is not initramfs.
> - during the real RAMDISK decompression to memory.
>
> > I'm fairly certain that back in 1990 I could unzip 134 bytes on my 33 mhz
> > 386 running dos in a fraction of a second.  What's the use case here?
>
> So the issue is not the empty initramfs image (which BTW could probably
> be made unecessary?), but a 10Mb RAMDISK image being decompressed by a
> 48Mhz PPC, which takes quite a few seconds.
>
> Need to rework the patch to use a __setup option as Andrew suggested.

It sounds to me like is the initial check (which is just giving a thumbs 
up/thumbs down "is this an initramfs", correct?) only needs to decompress the 
first page or so of data to make this determination.  A quick glance at the 
code seems to imply it's just checking the header and the first entry, so 4k 
should be plenty for that.

Some variant of lib/zlib_inflate...  Ouch, bit of a mess there.  Hey Matt: you 
know this area.  Is it feasible to do some kind of:

deflate_init(whatever)
deflate_next_x_bytes(source *, dest *, length)

To grab a the first X bytes from the initramfs image?

Rob

  reply	other threads:[~2005-11-21 15:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17 14:14 [PATCH] skip initramfs check Marcelo Tosatti
2005-11-17 22:56 ` Andrew Morton
2005-11-21  7:30 ` Rob Landley
2005-11-21  6:23   ` Marcelo Tosatti
2005-11-21 15:04     ` Rob Landley [this message]
2005-11-21 15:50       ` Matt Mackall
2005-11-21 10:49         ` Marcelo Tosatti

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=200511210904.46495.rob@landley.net \
    --to=rob@landley.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=mpm@selenic.com \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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