User: Password:
|
|
Subscribe / Log in / New account

USB and fast booting

USB and fast booting

Posted May 3, 2009 2:28 UTC (Sun) by giraffedata (subscriber, #1954)
In reply to: USB and fast booting by spitzak
Parent article: USB and fast booting

it seems that whatever step is trying to mount the USB device has to wait until initialization of the USB driver for that device is done.

It doesn't know it's trying to mount a USB device. All it knows is block devices, and the one it was told to mount doesn't exist.

While it's undesirable to have the USB driver hold up the boot, because the boot may not depend upon any device on a given hub, it might make sense to have a driver delay an open until the full initialization has taken place, to see if the device shows up.


(Log in to post comments)

USB and fast booting

Posted May 3, 2009 6:13 UTC (Sun) by dlang (subscriber, #313) [Link]

also, waiting for the USB driver to initialize isn't enough. you need to wait an unknown amount of time after the driver is initialized for all the devices to announce themselves.

the problem is that you have _no_ way of knowing if you have waited long enough. all you can do is to pick a number and guess.

it may be that the USB device was powered on at the same time as the computer, and until it finishes booting itself (and unknown time period), it can't announce it's existence.

USB and fast booting

Posted May 3, 2009 16:36 UTC (Sun) by giraffedata (subscriber, #1954) [Link]

also, waiting for the USB driver to initialize isn't enough. you need to wait an unknown amount of time after the driver is initialized for all the devices to announce themselves.

The suggestion was that the driver not consider itself initialized until it had waited a prescribed amount of time for devices to announce themselves.

the problem is that you have _no_ way of knowing if you have waited long enough. all you can do is to pick a number and guess.

That's a problem, and a big one, but it's not the immediate one. The immediate problem is that Linux already picked a number (100 ms) and it works for many people, but the new decoupling of USB driver initialization from mounting the root filesystem makes even that strategy fail. Hence the suggestion that the wait somehow be made part of mounting the USB root filesystem.

I think even if you could know when every device had reported in, it wouldn't solve the problem. Who says the root device has to be plugged in before the kernel begins running? The reason USB doesn't provide for definitive enumeration of devices is that it is designed for a fluid network, so maybe mount needs to wait for the operator to get around to plugging in the device as well.

USB and fast booting

Posted May 3, 2009 16:44 UTC (Sun) by dlang (subscriber, #313) [Link]

if you are waiting for the operator to plug something in I think it's very reasonable to have that operator take an action after doing to to start the system.

other buses that can tell that everything that exist has reported in do not have the same problem, even in the async mode they can work because they can delay long enough for everything to report, without having to wait any longer than that.

it's the need to wait unproductivly that is the problem here


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds