Skip to contentSkip to conversation

Update on hot plugging serialization without kernel event queuing

DISCUSSION David Brownell 1 participant 1 message Mar 12, 2001

lore
Share & tools
lore
#0 lore raw

----- Original Message -----
From: "Adam J. Richter" <[email protected]>
To: <[email protected]>
Sent: Saturday, February 24, 2001 8:25 PM
Subject: Update on hot plugging serialization without kernel event queuing

Quoted 9 lines
   ... deletia ...

Fortunately, there is an approach which would keep the kernel and user level code quite simple. You can avoid having race conditions and avoid adding event queues in the kernel by following one simple rule:
once hot plugging is enabled, the mechanism to enable access to a device that has been inserted should be activated from user level, not from the kernel. This allows the user level agent to acquire a lock corresponding to the inserted device _before_ it activates the slot.

That's a good basic strategy that should certainly work. Though "slot" sounds rather specific to one kind of hardware device ... and at another level that's what "mount" does for disk-like storage, so I wonder which subsystems aren't now supporting this strategy. (And PCI seems to be factored in terms of "function" ... unlike USB right now.)

It'd be good if the "configure through sysadmin tool" cases and hotplug alert handling used some common "enable now-connected device" back-end code. It sounds to me like that's what you're suggesting be created. The "CompactPCI" and "Hotplug PCI" hotplugging will certainly need a tool to issue their bus-specific ioctls. (I hope the user interface differs only in use of blue vs red leds!) We know we need such a facility for PCMCIA ("cardctl").

I'm not sure of how the details would work though. How would what you're saying affect some of the hotplugging work that's gotten discussed so far, like SCSI, Cardbus, PCI, PCMCIA, and USB?

- Dave

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel