From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: initramfs: udev, hotplug, klibc and modprobe
Date: Thu, 13 Jan 2005 15:21:21 +0000 [thread overview]
Message-ID: <1105629682.9061.63.camel@localhost.localdomain> (raw)
In-Reply-To: <1105307950.9630.49.camel@juerg-p4.bitron.ch>
On Thu, 2005-01-13 at 15:34 +0100, Juerg Billeter wrote:
> Kay Sievers wrote:
> > How does the transition from udevinitd to the real udevd look like on
> > your box, Jürg? How are "real" events handled, traveling in during the
> > transition?
>
> /proc/sys/kernel/hotplug gets set to /sbin/udevinitsend before entering
> "real" userspace. This binary exists in both, initramfs and userspace
> and acts almost like udevsend but sends the messages to udevinitd. So
> messages sent during initializing real userspace will be sent directly
> to udevinitd.
> As soon as real userspace is ready, it kills the initramfs' udevd,
> sets /proc/sys/kernel/hotplug to /sbin/udevsend and sends USR1 signal to
> udevinitd which flushes the queue by sending the messages to the "real"
> udevd.
Ok, but how do we handle possible unfinished processes that want to send
to the initudevd socket while we are killing the initudevd. I'm pretty
sure that people find a way to create s setup with hundreds of processes
still waiting. :)
How do we handle the events traveling in before we flush the queue to
the real udevd? Timeout?
> > Maybe udevd should be started from initramfs and never be replaced by a
> > different one? We may just add a knob to the "real" udevd to hold the
> > event execution back until userspace asks to flush the queue and udevd
> > switches over to the current behavior.
>
> Yes, this looks sane but you need to keep in mind that the early hotplug
> events need to be handled twice, once in early userspace (to load
> modules required for mounting rootfs) and once in real userspace. So
> udevd can't just hold the event execution back, it has to execute and
> keep a separate queue.
I think initramfs should use the hotplug multiplexer and call the normal
udev binary directly to create the nodes along with initudevd to queue
the events.
> A problem coming to my mind right now is that udevd doesn't know
> anything about the overmount of the rootfs and AFAIK it can't access the
> new/real rootfs without chroot/chdir at the right moment (between
> mounting the new rootfs to /root and before mount move /root to /) or am
> I mistaken here?
Don't know. :) If needed we can do this along with the transition from
"queue only" to "normal" behavior, right?
> BTW: It should probably be possible to have different versions of udev
> in the initramfs archive in the kernel and in userspace, at the moment I
> suppose this wouldn't work with my setup as udevd seems to check the
> version number in the messages.
Yes, we once had a binary struct with the values which made the magic
necessary. Now we have only a serialized environment. If we end with two
versions of udevd we may just think about removing the magic check.
Thanks,
Kay
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2005-01-13 15:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-09 21:59 initramfs: udev, hotplug, klibc and modprobe Jürg Billeter
2005-01-09 22:25 ` Juerg Billeter
2005-01-12 2:37 ` Kay Sievers
2005-01-12 5:07 ` Alexander E. Patrakov
2005-01-12 7:58 ` Jürg Billeter
2005-01-12 8:24 ` Jürg Billeter
2005-01-12 9:42 ` Harald Hoyer
2005-01-12 9:59 ` Alexander E. Patrakov
2005-01-13 1:08 ` Kay Sievers
2005-01-13 3:50 ` Alexander E. Patrakov
2005-01-13 12:55 ` Kay Sievers
2005-01-13 14:34 ` Juerg Billeter
2005-01-13 15:21 ` Kay Sievers [this message]
2005-01-13 16:16 ` Juerg Billeter
2005-01-14 9:29 ` Hannes Reinecke
2005-01-14 10:04 ` Kay Sievers
2005-01-14 10:27 ` Hannes Reinecke
2005-01-14 10:36 ` Kay Sievers
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=1105629682.9061.63.camel@localhost.localdomain \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.