Re: [PATCH] Remove module reference counting.

From: Stephen Hemminger (shemminger@osdl.org)
Date: Fri Jul 25 2003 - 14:26:51 EST


On Fri, 25 Jul 2003 04:00:18 +1000
Rusty Russell <rusty@rustcorp.com.au> wrote:

> Hi all,
>
> When the initial module patch was submitted, it made modules
> start isolated, so they would not be accessible until (if)
> initialization had succeeded. This broke partition scanning, and was
> immediately reverted, leaving us with a module reference count scheme
> identical to the previous one (just a faster implementation): we still
> have cases where modules can be access on failed load.
>
> Then Dave decided that the work of reference counting network
> driver modules everywhere is too invasive, so network driver modules
> now have zero reference counts always. The idea is that if you don't
> want the module removed, don't do it. ie. only remove the module if
> there's a bug, or you want to replace it.
>
> 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.
>
> Polite feedback welcome,
> Rusty.
> --

There are two possible objections to this:
 * Some developers keep the same kernel running and load/unload then reload
   a new driver when debugging. This would break probably or at least cause
   a large amount of kernel growth. Not that big an issue for me personally
   but driver writers seem to get hit with all the changes.

 * Drivers might get sloppy about not cleaning up timers and data structures
   -- more than they are already. You might want to have a kernel debug option
   that overwrite's the unloaded text with something guaranteed to cause an
   oops.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:26 EST