Re: hotplug (was devfs)

From: Nick Craig-Wood (ncw1@axis.demon.co.uk)
Date: Wed Nov 13 2002 - 05:48:09 EST


On Tue, Nov 12, 2002 at 01:51:08PM +0100, Oliver Neukum wrote:
> > Actually, here's a question: are /sbin/hotplug upcalls serialized in
> > some fashion? I'd hate to online a thousand devices in my disk array
> > and have the machine forkbomb itself.
>
> Nope, no serialisation. You don't have any guarantee even that
> addition will be delivered before removal.

And that is why (we finally discovered) we were getting
non-deterministic device numbering of USB nodes.

We have machines with 6 x 4 port USB <-> serial converters attached.
These would get randomly assigned usb device ids and hence random
/dev/ttyUSB nodes. Not very useful when there is a load of different
things attached to the 24 serial ports!

Sometimes we also found that one of the devices wouldn't get
initialised properly.

We fixed these problems by removing hotplug and loading the relevant
kernel modules in the correct order and voila a perfectly
deterministic order for the /dev/ttyUSBs with all devices initialised.

Plugging in our USB bus with 24 devices on it does indeed produce a
mini-forkbomb effect ;-) (Especially since these Keyspan devices are
initialised twice - once without firmware and once with firmware.)

So - perhaps hotplug ought to be serialised?

-- 
Nick Craig-Wood
ncw1@axis.demon.co.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:28 EST