From: Andreas Robinson <andr345@gmail.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: fastboot: unpacking initramfs faster
Date: Tue, 24 Mar 2009 08:39:08 +0100 [thread overview]
Message-ID: <1237880348.7725.17.camel@andreas-desktop> (raw)
Hi,
here's a quick update on what can be done to make initramfs unpacking
faster that I suggested a few weeks ago. There results are mixed.
The bad:
I tried running the initramfs unpacking asynchronously (and earlier) but
ran into a curious problem: The parent thread stalled until
decompression was done. I don't know why - I made sure that the two
threads ran on different cores. Perhaps the parent was cache starved.
I then looked at multithreaded decompression and found that neither gzip
files nor deflate streams provide enough information (eg block lengths)
to let you share the decompression among threads.
It can be done of course, but obviously not without modifying file
formats and userspace tools.
(Thoughts of snowballs and hell presented themselves at this point.)
The good:
LZO compression is roughly twice as fast as gunzip while files are only
about 7% bigger. The file format is multiprocessing friendly and the
decompressor is already in the mainline kernel.
I estimate that single-threaded LZO would cut the unpacking time almost
in half even on a low-end PC with a slow drive, like the Eee 901.
Finally, someone already wrote support for bzip2 and lzma compressed
initramfs. It's in the -tip tree. Adding LZO to that list should be
straightforward so that's where I'm going next.
Cheers,
Andreas
next reply other threads:[~2009-03-24 7:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-24 7:39 Andreas Robinson [this message]
[not found] <cj9yI-540-17@gated-at.bofh.it>
2009-03-24 22:11 ` fastboot: unpacking initramfs faster Bodo Eggert
2009-03-26 7:52 ` Andreas Robinson
2009-03-26 11:26 ` Bodo Eggert
2009-03-26 11:57 ` Andreas Robinson
2009-03-26 12:56 ` Bodo Eggert
2009-03-26 16:05 ` Andreas Robinson
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=1237880348.7725.17.camel@andreas-desktop \
--to=andr345@gmail.com \
--cc=arjan@infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox