Re: [RFC PATCH] Move actually mounting the root filesystem into its own series of hooks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Jeremy Katz wrote:
On Tuesday, February 24 2009, Seewer Philippe said:
Victor Lowther wrote:
[snip]
- 'dhclient -nw': Why are you starting the dhclient in daemon mode? Couldn't that pose problems when dhcp takes ages to acquire an adress? I mean like, we've ifup'ed all interfaces and are allready in the mount hooks without an ip. I guess we'd have to have a blocking mount-script waiting for at least one interface to be really brought up or spew an error message after a specific time out.
I run it in daemon mode so that udev does not have to wait on it. The dhclient-script creates a file when the interface is up, and any mounts that depend on the network can wait for those files to appear. ifup does the same thing with static interfaces.
I don't like the asynchronousnes of this. This means we have to wait in pre-mount or mount until we have at least one interface up without any knowledge if another might come up later as well.

The problem is that the appearance of devices *is* asynchronous and you
have to keep things as event driven.  That's why originally everything
was being driven off of udev rules rather than hooks.  If you start
trying to do things in hooks and assume synchronous behavior, boot will
be slower and you also can't have, eg, usb devices being used (usb plug
events are always async; anything else is an illusion)

That is of course correct. Though in the case of a netboot I'd like to argue that we absolutely need to make sure that networking is correctly set up before trying to mount anything. So making it synchronous makes the whole a lot easier to control.

And to be honest, with netboot I don't think boot time matters all that much. The bottleneck will always be dhcp and the net itself.

Regards,
Philippe
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux