linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Will Drewry <wad@chromium.org>
To: richard@nod.at
Cc: Kees Cook <keescook@chromium.org>,
	Mike Snitzer <snitzer@redhat.com>,
	linux-doc@vger.kernel.org,
	device-mapper development <dm-devel@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	helen.koike@collabora.com, linux-lvm@redhat.com,
	enric.balletbo@collabora.com, kernel@collabora.com,
	Alasdair G Kergon <agk@redhat.com>
Subject: Re: [linux-lvm] [PATCH v10 0/2] dm: boot a mapped device without an initramfs
Date: Tue, 6 Nov 2018 08:24:02 -0600	[thread overview]
Message-ID: <CAAFS_9F62S_rm2uJDzXJzJyM82-o-xBAnx5Rkk-3iDD53YS72g@mail.gmail.com> (raw)
In-Reply-To: <3624012.MiIzIq7dko@blindfold>

Hi Richard, Helen,

On Sat, Nov 3, 2018 at 4:10 AM Richard Weinberger <richard@nod.at> wrote:
>
> Helen,
>
> Am Samstag, 3. November 2018, 04:53:39 CET schrieb Helen Koike:
> > As mentioned in the discussion from the previous version of this patch, Android
> > and Chrome OS do not use initramfs mostly due to boot time and size liability.
>
> Do you have numbers on that?

Originally, we saved ~200 ms, but I don't think we have recent
numbers.  (Unless Helen has some!) We first authored and posted this
patch in 2010:
- https://marc.info/?l=dm-devel&m=127429492521964&w=2
- https://marc.info/?l=dm-devel&m=127429499422096&w=2
- https://marc.info/?l=dm-devel&m=127429493922000&w=2

Every Chrome OS device uses a variant of this patch as well as
Android devices starting last year (if they use AVB 2.0).

Originally, the intent was the measured latency reduction.  We get a
linear speed
improvement when doing a cryptographic verification of the kernel and
initramfs.
Why? More data == more hashes (sha256 w/compute per block).  There's
additional overhead from bringing up early userspace, but those are the
numbers I don't have.

> I understand that using something like dracut with systemd inside is not what you
> want from a boot time point of view.
> But having an initramfs embedded into the kernel image which contains only a single
> static linked binary can be *very* small and fast.
> If you invest a little more time, you don't even need a libc, just fire up some
> syscalls to setup your dm. I use this technique regularly on deeply embedded systems
> to setup non-trivial UBIFS/crypto stuff.
>
> Want I'm trying to say, before adding ad-hoc a feature to the kernel, we should be
> very sure that there is no other way to solve this in a sane manner.
> We have initramfs support for reasons.

I very much appreciate the perspective, but after 8 years in shipping
devices after
integrating feedback from kernel maintainers over the subsequent years, this
doesn't feel like an "ad-hoc" feature.  It's been effective and fit in
well with the
existing kernel functionality, etc (imho :).  What level of
performance improvement or
other changes might be necessary to make the cut?

Thanks!
will

      reply	other threads:[~2018-11-06 14:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-03  3:53 [linux-lvm] [PATCH v10 0/2] dm: boot a mapped device without an initramfs Helen Koike
2018-11-03  3:53 ` [linux-lvm] [PATCH v10 1/2] dm ioctl: add a device mapper ioctl function Helen Koike
2018-11-03  3:53 ` [linux-lvm] [PATCH v10 2/2] init: add support to directly boot to a mapped device Helen Koike
2018-11-03  9:10 ` [linux-lvm] [PATCH v10 0/2] dm: boot a mapped device without an initramfs Richard Weinberger
2018-11-06 14:24   ` Will Drewry [this message]

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=CAAFS_9F62S_rm2uJDzXJzJyM82-o-xBAnx5Rkk-3iDD53YS72g@mail.gmail.com \
    --to=wad@chromium.org \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=enric.balletbo@collabora.com \
    --cc=helen.koike@collabora.com \
    --cc=keescook@chromium.org \
    --cc=kernel@collabora.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-lvm@redhat.com \
    --cc=richard@nod.at \
    --cc=snitzer@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).