linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Greg KH <greg@kroah.com>
Cc: linux-usb-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, Patrick Mochel <mochel@osdl.org>
Subject: Re: [linux-usb-devel] [RFC] consolidate /sbin/hotplug call for pci and usb
Date: Thu, 26 Sep 2002 12:32:08 -0700	[thread overview]
Message-ID: <3D9360B8.20200@pacbell.net> (raw)
In-Reply-To: 20020926184345.GC6250@kroah.com


>>>Well, that's a driver unload issue, which I think everyone agrees on the
>>>fact that it's not ok to do automatic driver unload when a device is
>>>removed, because of this very problem.
>>
>>I think it _could_ be fine to do such rmmods, if all the module
>>remove races were removed ... and (for this issue) if the primitve
>>were actually "remove if the driver is not (a) in active use, or
>>(b) bound to any device".  Today we have races and (a) ... but it's
>>the lack of (b) that prevents hotplug from even trying to rmmod,
>>on the optimistic assumption there are no races.
> 
> 
> But how do we accomplish (b) for devices that we can't remove from the
> system?  Like 99.9% of the pci systems?
> 
> I agree it would be "nice", but probably never realistic :)

There would be two modes for 'rmmod'.  One is the "remove if the
kernel can tell it can't be used" (as described above), suitable
for automation.  The other gives the rude end-user failure modes:
"remove this module if it's not in active use", which is all we
have today ... a mode suitable only for developers or sysadmins.

Userland needs to make the policy choice, then tell the kernel
whether to ignore any unopened (but bound) devices.

Highly realistic, IMO.  It's just a question of ensuring some data
the kernel already holds (N devices are bound to this driver, even
if none are currently opened) is considered by rmmod.  I almost put
together a patch for it at one time.  There seems to be a change
in maintainer under way, maybe it'd be worth revisiting this.

- Dave



  reply	other threads:[~2002-09-26 19:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-25 21:29 [RFC] consolidate /sbin/hotplug call for pci and usb Greg KH
2002-09-25 22:04 ` Kai Germaschewski
2002-09-25 22:48   ` Greg KH
2002-09-26  0:11 ` [linux-usb-devel] " David Brownell
2002-09-26  0:25   ` Greg KH
2002-09-26  2:44     ` David Brownell
2002-09-26  4:27       ` Greg KH
2002-09-26 16:14         ` David Brownell
2002-09-26 18:43           ` Greg KH
2002-09-26 19:32             ` David Brownell [this message]
2002-09-26 19:34             ` Alan Stern
2002-09-26 23:35               ` [linux-usb-devel] [RFC] consolidate /sbin/hotplug call for pciand usb Oliver Neukum
2002-09-26 17:48 ` [RFC] consolidate /sbin/hotplug call for pci and usb - take 2 Greg KH
     [not found] <20020925212955.GA32487@kroah.com.suse.lists.linux.kernel>
     [not found] ` <3D9250CD.7090409@pacbell.net.suse.lists.linux.kernel>
2002-09-26  0:33   ` [linux-usb-devel] [RFC] consolidate /sbin/hotplug call for pci and usb Andi Kleen
2002-09-26  0:46     ` Matthew Dharm
2002-09-26  1:01       ` Andi Kleen
2002-09-26  2:30       ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D9360B8.20200@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=mochel@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).