Re: Wait for console to become available, v3.2

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

 



On Wed, Apr 22, 2009 at 05:21:51PM -0400, Alan Stern wrote:
> [CC: list trimmed, since this may no longer be of general interest]
> 
> On Wed, 22 Apr 2009, David VomLehn wrote:
> 
> > I'm going to see if I can come up with some sort of concrete proposal for
> > waiting for hotpluggable boot devices. I'd appreciate it if you could think
> > about how to implement the USB-specific part of this. Once we have something
> > that makes sense, and works, we can go back and pick up the details for
> > the console, IP autoconfig, and anything else that someone might need done.
> 
> Whatever you come up with, it should operate on a per-subsystem basis,
> perhaps together with an additional "all subsystems are done with their
> boot probing" mechanism.

Absolutely.

> (USB disk drives will still be a problem...  I'm going to punt on them 
> for now.)

I'm quite willing to punt on them for now, too, since we do have rootdelay
and rootwait. If we do a good job of things, though, we might be able to
improve on those mechanisms.
 
> Would it be sufficient to have a "number of pending probes" counter
> together with a waitqueue?  Your console routine could first wait for
> all the async stuff to end, so that all the USB host controllers had
> been registered, and then wait (on the new waitqueue) for the counter
> to go to 0.  The hub driver would maintain the counter and signal the
> waitqueue whenever the counter was decremented to 0.

I think that something like this is reasonable. It requires that all concerned
bus subsystems increment the number of pending probes by the time the
async stuff ends, but I think that's reasonable. And I hope that enough other
people think about this enough to let us know whether it is.

> Is it safe to say that we don't have to worry about udev or other 
> userspace hotplug mechanisms?  After all, we are talking about things 
> that happen before the first userspace process is set up.  And if we 
> had to wait for drivers to be modprobed into the kernel, we'd again be 
> facing unpredictable delays.

One data point--the kernel doesn't even export the console interfaces to
modules, so you can't have a hotplugged console. The concern is really only
those devices you need to finish your boot with enough functionality to do
everything else--that functionality will include udev, which can handle
anything else.

> Alan Stern

David VomLehn
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux