From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Mon, 22 Jan 2001 05:28:41 +0000 Subject: Re: unloading drivers and usage counters Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org > From: Oliver Neukum > Sent: Sunday, January 21, 2001 1:12 PM > > going through the hotplugging scripts I noticed that there's no good way to > unload modules. A time based approach cannot be used due to race conditions. No good way now, true; I'm not sure I'd call the reasons "races" though. More like different models for why "kernel modules" get used. > Unloading on device removal requires keeping a usage counter in user space. > This seems to be a brittle approach. I can imagine implementing a workable solution in userspace, which may be the best that the 2.4 kernels can handle. Yep, brittle is a good word for that! > Not increasing the module usage counters on connect seems to be the wrong > strategy. The desire to keep the modules unloadable has come back to bite us > into our behind. > If the usage counters were increased for each connected device unloading would > come natural. Sounds like a substantial change in the model for what module use counts should be. Maybe the pcmcia_cs tools have a better model? - Dave > A patch to disconnect drivers by an ioctl has been posted. It > would allow forced unload. _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel