Re: Testers wanted: exorcised kmod.c: no more daemon!

H. Peter Anvin (hpa@transmeta.com)
14 Apr 1998 09:35:53 GMT


Followup to: <Pine.LNX.3.96.980414050106.1417A-100000@troufion.bob>
By author: Antoine Reid <linux@jonction.net>
In newsgroup: linux.dev.kernel
>
> hmmm didn't the old kerneld remove the modules that had a count=0 for a period
> of time, rather that just periodically remove the modules?
> let's say I stop using a device at 23:59:55 and start using it at 00:00:05, now
> only 10 seconds have elapsed, but my root cronjob might have "rmmod -a" at
> midnight and the module is unloaded.. hmm makes any sense? any easy way to
> fix this, while still having a userland unload?
>

Have the kernel time stamp when the use count goes to zero (in
MOD_DEC_USE_COUNT) and expose it via /proc/modules. Then you can see
from user space how long the module has been unused.

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

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