Re: kmod and autoclean modules

Greg Zornetzer (gaz@andrew.cmu.edu)
Wed, 20 May 1998 23:35:48 -0400 (EDT)


On Wed, 20 May 1998, D.A. Harris wrote:

> Hi,
>
> So what is the reason why kmod doesn't remove modules? It just doesn't make
> any sense to me. Why even have the designation of an autoclean module if
> kmod doesn't pay attention to it? So now we have to have a crontab file
> that occasionally runs rmmod (or whatever). If time is saved by loading
> modules with kmod, why wouldn't time be saved in removing them with
> kmod?
It isn't really a matter of time. It's a matter of putting only the
necessary code in the kernel.

Sure, we could put code in the kernel that removes modules like kerneld
did (this was done in the early kernels with kmod: see 2.1.90), but
there's no advantage to putting it in the kernel. The exact same
functionality can be provided by the exact same code running in userspace.
See the code for kerneld, it just has a loop that runs
delete_module(NULL) every once in a while (effectively the same as running
rmmod -a).

Greg Zornetzer - gaz+@andrew.cmu.edu
"Light shines brightest in the darkest night"
http://www.contrib.andrew.cmu.edu/~gaz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu