linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: davem@redhat.com, arjanv@redhat.com,
	Linus Torvalds <torvalds@transmeta.com>,
	greg@kroah.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Remove module reference counting.
Date: Mon, 28 Jul 2003 04:48:35 +1000	[thread overview]
Message-ID: <20030727193919.6C7452C315@lists.samba.org> (raw)
In-Reply-To: Your message of "26 Jul 2003 00:24:49 +0100." <1059175489.1206.11.camel@dhcp22.swansea.linux.org.uk>

In message <1059175489.1206.11.camel@dhcp22.swansea.linux.org.uk> you write:
> On Gwe, 2003-07-25 at 20:26, Stephen Hemminger wrote:
> > > 	If module removal is to be a rare and unusual event, it
> > > doesn't seem so sensible to go to great lengths in the code to handle
> > > just that case.  In fact, it's easier to leave the module memory in
> > > place, and not have the concept of parts of the kernel text (and some
> > > types of kernel data) vanishing.
> 
> Uggh. There is a difference between taking the approach that some stuff
> is hard to handle and gets into trouble for using MOD_INC/DEC so is
> unsafe, and doing the locking from the caller, or arranging that you
> know the device is quiescent in the unload path and not allowing
> unloading to work properly.

We can do this everywhere: we have the technology.  But as I pointed
out, at least some hackers who know what they are doing have balked at
what that involves.  This is apart from the subsystems which are still
not safe as it stands.

> I've got drivers that use MOD_INC/DEC and are technically unsafe, they
> by default now don't unload and its an incentive to fix them. I'd hate
> to have my box cluttering up and have to keep rebooting to test drivers
> because of inept implementations however.

But OTOH, this patch would make those modules perfectly safe: no
fixing needed.

One modification is to tally up the deleted modules in /proc/modules
under a "[deleted]" entry or somesuch, but allow you to "rmmod
[deleted]" and actually free that memory (and taint your kernel). eg:

	# lsmod
	Module                  Size  Used by
	loop                    8144   0
	[deleted]	       12345
	# rmmod '[deleted]'

Thoughts?
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2003-07-28  2:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-24 18:00 [PATCH] Remove module reference counting Rusty Russell
2003-07-25 17:47 ` David S. Miller
2003-07-27 18:50   ` Rusty Russell
2003-07-25 17:54 ` Greg KH
2003-07-25 19:11   ` Greg KH
2003-07-25 19:26 ` Stephen Hemminger
2003-07-25 19:32   ` Greg KH
2003-07-25 22:26   ` Rusty Russell
2003-07-26 19:31     ` Linus Torvalds
2003-07-26 19:37       ` Arjan van de Ven
2003-07-27  5:38         ` Aschwin Marsman
2003-07-27 11:10           ` Alan Cox
2003-07-27 11:09         ` Alan Cox
2003-07-27 19:34       ` Rusty Russell
2003-07-27 21:47         ` Arjan van de Ven
2003-07-28  0:01           ` Alan Cox
2003-07-28  0:12           ` Bill Nottingham
2003-07-28 11:38             ` Alan Cox
2003-07-29 20:33               ` Rusty Russell
2003-07-30  1:55                 ` Greg KH
2003-07-30 14:40                 ` Alan Cox
2003-07-28 11:40         ` Alan Cox
2003-07-28 18:11         ` Gianni Tedesco
2003-07-28 19:03           ` Mike Fedyk
2003-08-01  2:39         ` Linus Torvalds
2003-07-25 23:24   ` Alan Cox
2003-07-27 18:48     ` Rusty Russell [this message]
2003-07-25 22:43 ` Gianni Tedesco
2003-07-25 23:37   ` Bernd Eckenfels
2003-07-26 20:18   ` Rusty Russell
2003-07-28 11:51 ` Rahul Karnik
2003-07-28 23:13   ` Rusty Russell
2003-07-29  2:39     ` Rahul Karnik
2003-07-29  2:10 Perez-Gonzalez, Inaky

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=20030727193919.6C7452C315@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjanv@redhat.com \
    --cc=davem@redhat.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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).