Re: rmmod -a does not unload unused modules in 2.2.x

Andrew V. Samoilov (sav@bcs.zp.ua)
Mon, 22 Nov 1999 14:06:30 +0200


Khimenko Victor wrote:
: In <19991122115524.A162@bcs.zp.ua> Andrew V. Samoilov (sav@bcs.zp.ua) wrote:
: > Keith Owens wrote:
: > : On Sun, 21 Nov 1999 21:08:44 +0200,
: > : "Andrew V. Samoilov" <sav@bcs.zp.ua> wrote:
: : >>Some time ago here was a discussion about kerneld and Linux 2.2.x kernels.
: : >>I remember it was proposed to use a 'rmmod -a' from cron to unload unused
: : >>modules. But it doesn't work at least for 2.2.10 and 2.2.13 kernels.
: > :
: > : It does for me. rmmod -a only gets rid of modules marked as autoclean,
: > : the modules have to be loaded with modprobe -k or insmod -k before
: > : rmmod -a will remove them. Does lsmod say autoclean against these
: > : modules?
: > Yes, it's so...
:
: > $ lsmod
: > Module Size Used by
: > $ insmod -k iBCS
: > $ lsmod
: > Module Size Used by
: > iBCS 119100 0 (autoclean)
: > $ rmmod -a
: > $ lsmod
: > Module Size Used by
: > iBCS 119100 0 (autoclean)
:
: Hey, just ONE `rmmod -a` ! You need TWO (exactly two: first call will mark them
: as "Ok to unload" and second call will really unload them)...
:

Well, when I look to the module.c, I think exactly so, but...

$ lsmod
Module Size Used by
iBCS 119100 0 (autoclean)
$ rmmod -a ; rmmod -a
$ lsmod
Module Size Used by
iBCS 119100 0 (autoclean)

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