From: Andrew Morton <akpm@linux-foundation.org>
To: David Disseldorp <ddiss@suse.de>
Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
willy@infradead.org, Martin Wilck <mwilck@suse.com>
Subject: Re: [PATCH v7 3/6] initramfs: add INITRAMFS_PRESERVE_MTIME Kconfig option
Date: Tue, 26 Apr 2022 13:39:08 -0700 [thread overview]
Message-ID: <20220426133908.f779a181a11afc4ba56508d9@linux-foundation.org> (raw)
In-Reply-To: <20220404093429.27570-4-ddiss@suse.de>
On Mon, 4 Apr 2022 11:34:27 +0200 David Disseldorp <ddiss@suse.de> wrote:
> initramfs cpio mtime preservation, as implemented in commit 889d51a10712
> ("initramfs: add option to preserve mtime from initramfs cpio images"),
> uses a linked list to defer directory mtime processing until after all
> other items in the cpio archive have been processed. This is done to
> ensure that parent directory mtimes aren't overwritten via subsequent
> child creation.
>
> The lkml link below indicates that the mtime retention use case was for
> embedded devices with applications running exclusively out of initramfs,
> where the 32-bit mtime value provided a rough file version identifier.
> Linux distributions which discard an extracted initramfs immediately
> after the root filesystem has been mounted may want to avoid the
> unnecessary overhead.
>
> This change adds a new INITRAMFS_PRESERVE_MTIME Kconfig option, which
> can be used to disable on-by-default mtime retention and in turn
> speed up initramfs extraction, particularly for cpio archives with large
> directory counts.
>
> Benchmarks with a one million directory cpio archive extracted 20 times
> demonstrated:
> mean extraction time (s) std dev
> INITRAMFS_PRESERVE_MTIME=y 3.808 0.006
> INITRAMFS_PRESERVE_MTIME unset 3.056 0.004
So about 35 nsec per directory?
By how much is this likely to reduce boot time in a real-world situation?
next prev parent reply other threads:[~2022-04-26 20:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-04 9:34 [PATCH v7 0/6] initramfs: "crc" cpio format and INITRAMFS_PRESERVE_MTIME David Disseldorp
2022-04-04 9:34 ` [PATCH v7 1/6] initramfs: refactor do_header() cpio magic checks David Disseldorp
2022-04-04 9:34 ` [PATCH v7 2/6] initramfs: make dir_entry.name a flexible array member David Disseldorp
2022-04-04 9:34 ` [PATCH v7 3/6] initramfs: add INITRAMFS_PRESERVE_MTIME Kconfig option David Disseldorp
2022-04-26 20:39 ` Andrew Morton [this message]
2022-04-27 21:01 ` David Disseldorp
2022-04-04 9:34 ` [PATCH v7 4/6] gen_init_cpio: fix short read file handling David Disseldorp
2022-04-26 20:40 ` Andrew Morton
2022-04-27 21:05 ` David Disseldorp
2022-04-04 9:34 ` [PATCH v7 5/6] gen_init_cpio: support file checksum archiving David Disseldorp
2022-04-04 9:34 ` [PATCH v7 6/6] initramfs: support cpio extraction with file checksums David Disseldorp
2022-04-26 9:01 ` [PATCH v7 0/6] initramfs: "crc" cpio format and INITRAMFS_PRESERVE_MTIME David Disseldorp
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=20220426133908.f779a181a11afc4ba56508d9@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ddiss@suse.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mwilck@suse.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@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).