linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	x86@kernel.org, hpa@zytor.com, dwmw2@infradead.org,
	baolu.lu@linux.intel.com, joro@8bytes.org,
	iommu@lists.linux-foundation.org, andreas.noever@gmail.com,
	michael.jamet@intel.com, mika.westerberg@linux.intel.com,
	YehezkelShB@gmail.com, linux-usb@vger.kernel.org
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jessica Yu <jeyu@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH v2 1/2] init/initramfs.c: allow asynchronous unpacking
Date: Thu, 11 Mar 2021 17:55:19 +0000	[thread overview]
Message-ID: <20210311175519.GV4332@42.do-not-panic.com> (raw)
In-Reply-To: <CAHk-=wiK_0RATa3AnRSODtSN2X5Cc0RfudLpr16aLhwxoU1yEA@mail.gmail.com>

On Tue, Mar 09, 2021 at 02:07:36PM -0800, Linus Torvalds wrote:
> On Tue, Mar 9, 2021 at 1:17 PM Rasmus Villemoes
> <linux@rasmusvillemoes.dk> wrote:
> >
> > So add an initramfs_async= kernel parameter, allowing the main init
> > process to proceed to handling device_initcall()s without waiting for
> > populate_rootfs() to finish.
> 
> I like this smaller second version of the patch, but am wondering why
> we even need the parameter.
> 
> It sounds mostly like a "maybe I didn't think of all cases" thing -
> and one that will mean that this code will not see a lot of actual
> test coverage..
> 
> And because of the lack of test coverage, I'd rather reverse the
> meaning, and have the async case on by default (without even the
> Kconfig option), and have the kernel command line purely as a "oops,
> it's buggy, easy to ask people to test if this is what ails them".

If we're going to set this as default it might be good to document on
init.h that components that need content in initramfs need the wait
call.

> What *can* happen early boot outside of firmware loading and usermodehelpers?

*In practice* the only thing I can think of at this time is races with
other rootfs_initcall() calls, granted ordering among these is done at
linker time, but I can't think of a issue with them:

arch/x86/kernel/pci-dma.c:rootfs_initcall(pci_iommu_init);
drivers/iommu/intel/irq_remapping.c:rootfs_initcall(ir_dev_scope_init);
drivers/mfd/sta2x11-mfd.c:rootfs_initcall(sta2x11_mfd_init);
drivers/thunderbolt/nhi.c:rootfs_initcall(nhi_init);

But Cc'ing the maintainers of these components just in case.

  Luis

  parent reply	other threads:[~2021-03-11 17:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 14:29 [PATCH/RFC 0/2] background initramfs unpacking, and CONFIG_MODPROBE_PATH Rasmus Villemoes
2021-02-24 14:29 ` [PATCH/RFC 1/2] init/initramfs.c: allow asynchronous unpacking Rasmus Villemoes
2021-02-24 17:17   ` Linus Torvalds
2021-02-24 22:13     ` Rasmus Villemoes
2021-03-02 16:26   ` Luis Chamberlain
2021-02-24 14:29 ` [PATCH/RFC 2/2] modules: add CONFIG_MODPROBE_PATH Rasmus Villemoes
2021-02-24 22:19 ` [PATCH/RFC 0/2] background initramfs unpacking, and CONFIG_MODPROBE_PATH Rasmus Villemoes
2021-03-09 21:16 ` [PATCH v2 " Rasmus Villemoes
2021-03-09 21:16   ` [PATCH v2 1/2] init/initramfs.c: allow asynchronous unpacking Rasmus Villemoes
2021-03-09 22:07     ` Linus Torvalds
2021-03-09 22:39       ` Rasmus Villemoes
2021-03-11 17:55       ` Luis Chamberlain [this message]
2021-03-09 22:16     ` Linus Torvalds
2021-03-09 22:51       ` Rasmus Villemoes
2021-03-11  0:17       ` Rasmus Villemoes
2021-03-11  1:45         ` Rasmus Villemoes
2021-03-11 18:02           ` Linus Torvalds
2021-03-13 13:13             ` Rasmus Villemoes
2021-03-09 21:17   ` [PATCH v2 2/2] modules: add CONFIG_MODPROBE_PATH Rasmus Villemoes
2021-03-10  9:46     ` Greg Kroah-Hartman
2021-03-11 13:28     ` Jessica Yu

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=20210311175519.GV4332@42.do-not-panic.com \
    --to=mcgrof@kernel.org \
    --cc=YehezkelShB@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreas.noever@gmail.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jeyu@kernel.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=michael.jamet@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).