[v2] [PATCH 0/2] Populate rootfs asynchronously and early

Scott James Remnant scott at ubuntu.com
Tue Dec 8 19:42:47 UTC 2009


On Tue, 2009-12-08 at 19:13 +0000, Andy Whitcroft wrote:

> On Tue, Dec 08, 2009 at 11:44:34AM +0200, Surbhi Palande wrote:
> > populate_rootfs() is called asynchronously to reduce the boot time.
> 
> This comment I made on a previous version, but it got lost in my last
> round of comments so I repeat it here:
> 
> This could do with some more words of explanation.  We should be telling
> them why this is true and why it is safe.
> 
> "The expansion of the initramfs is completely independant of other boot
> activities.  The original data is already present at boot and the
> filesystem is not required until we are ready to start init.  It is
> therefore reasonable to populate the rootfs asynchronously.  Move this
> processing to an async call."
> 
It's worth pointing out that the upstream kernel folks probably won't
agree with this straight away.

Part of the original goal of the initramfs was that the kernel might
actually want to call out to it for its own init purposes before
actually passing over to it's real init.

Their usual example is things like firmware loading, or that crazy
kernel-calls-modprobe stuff that won me the Dell Tablet :p


The simple fact is that it never worked, because there's more to making
the initramfs *ready* than just unpacking it.  We need filesystems
like /proc and /sys mounted in it, we need to run depmod inside it (so
that modprobe works), you need udev running to process firmware
requests, etc.


Having populate_rootfs() synchronous makes sense for the *original*
design goals of the initramfs (vs. initrd).  However since no userspace
ever implemented it that way, and things have moved on since then with
regards to kernel/userspace communication, if you were doing it now
you'd make it async.  Which we've done.

This may take some arguing upstream.

Plus you can guarantee that certain Dutch-born Intel people will stick
their oar in about how it's not worth accepting the patch because you
shouldn't have an initramfs anyway.

Scott
-- 
Scott James Remnant
scott at ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20091208/be6867c8/attachment.sig>


More information about the kernel-team mailing list