hotplug (was devfs)
Quoted 8 lines · Nick Craig-Wood
Quoted 6 lines · Oliver Neukum
Quoted 3 lines
Actually, here's a question: are
/sbin/hotplugupcalls 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.
Quoted 7 lines
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/ttyUSBnodes. Not very useful when there is a load of different things attached to the 24 serial ports!
Please clarify. Did this happen if you connected a hub these gadgets sit on? Do you use the same type of device six times ?
Quoted 5 lines
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
Modules ? Plural?
Quoted 4 lines
deterministic order for the
/dev/ttyUSBswith 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.)
There's a further problem.
Quoted 1 line
So - perhaps hotplug ought to be serialised?
Definitely, but how far?
Regards
Oliver
-------------------------------------------------------
This sf.net email is sponsored by: Are you worried about your web server security? Click here for a FREE Thawte Apache SSL Guide and answer your Apache SSL security
needs: http://www.gothawte.com/rd523.html
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · [email protected] wrote:
Quoted 4 lines · Nick Craig-Wood
We have machines with 6 x 4 port USB <-> serial converters attached. These would get randomly assigned usb device ids and hence random
/dev/ttyUSBnodes. Not very useful when there is a load of different things attached to the 24 serial ports!
Right, this is why "physical" paths are needed as well as sequentially assigned /dev/...N nodes.
Quoted 7 lines
Quoted 5 lines
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
Modules ? Plural?
Sounds like a better fix might have been to teach hotplug about your additional modules... or to fix the modules so they initialized correctly!
Quoted 4 lines
Quoted 1 line
So - perhaps hotplug ought to be serialised?
Definitely, but how far?
Until about the last week before 2.4.0final shipped, hotplug was serialized. The serialization got removed at the same time keventd got added.
Why was it removed? Because serializing meant that kernel locks had to be held until a user mode program returned. That caused deadlock when, for example, network hotplug had to grab that same lock ... it basically wasn't possible to get away from that problem in at least that case, and by extension likely other cases.
So I'm not sure I see hotplug ever getting serialized. But then, I don't see any reason it would ever fix the problem of needing to map /dev/... nodes to the physical device they represent, either.
- Dave
-------------------------------------------------------
This sf.net email is sponsored by: Are you worried about your web server security? Click here for a FREE Thawte Apache SSL Guide and answer your Apache SSL security
needs: http://www.gothawte.com/rd523.html
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 12 lines · On Wed, Nov 13, 2002 at 03:15:01PM +0100, [email protected]…
Quoted 11 lines · Nick Craig-Wood
Quoted 6 lines · Oliver Neukum
Quoted 3 lines
Actually, here's a question: are
/sbin/hotplugupcalls 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.
Quoted 7 lines
Quoted 4 lines
We have machines with 6 x 4 port USB <-> serial converters attached. These would get randomly assigned usb device ids and hence random
/dev/ttyUSBnodes. Not very useful when there is a load of different things attached to the 24 serial ports!Please clarify. Did this happen if you connected a hub these gadgets sit on?
It happens on bootup when effectively the USB subsystem becomes aware of all the devices at once and also when you disconnect and reconnect the hub the devices sit on.
Quoted 1 line
Do you use the same type of device six times ?
Yes.
Quoted 7 lines
Quoted 5 lines
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
Modules ? Plural?
We found we had to load the keyspan module then the usb-uhci module for ideal startup without hotplug.
Quoted 6 lines
Quoted 4 lines
deterministic order for the
/dev/ttyUSBswith 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.)There's a further problem.
Do you mean the double initialisation? That is the way the keyspan devices work. They enumerate first time as a dumb device, get sent their firmware and then enumerate again.
Quoted 3 lines
Quoted 1 line
So - perhaps hotplug ought to be serialised?
Definitely, but how far?
Indeed!
Signature · 13 lines
Nick Craig-Wood [email protected] ------------------------------------------------------- This sf.net email is sponsored by: Are you worried about your web server security? Click here for a FREE Thawte Apache SSL Guide and answer your Apache SSL security needs: http://www.gothawte.com/rd523.html _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel