Re: Lance driver

Jacek Zapala (jacek@deuter.im.pw.edu.pl)
Sun, 12 May 1996 18:27:44 +0200


Hi.

Some people (including me) complained about kerneld removing modules just
after the last use. The problem is that kerneld remove the module after the
time specified by the 'delay' parameter counting from _loading_ and not
after the last use. Of course, it is so because kerneld has no idea, when
the module was used after loading it.

Couldn't we just send the appropriate message to kerneld when the filesystem
is being mounted or /dev/fd0 opened ? The only thing we would have to do
will be to add message sending in the places where kerneld is called to load
the module. For example, we would have to change super.c from:

#ifdef CONFIG_KERNELD
if (!fs && (request_module(name) == 0)) {
for (fs = file_systems; fs && strcmp(fs->name, name); fs = fs->next)
;
}
#endif

to:

#ifdef CONFIG_KERNELD
if (!fs) {
if (request_module(name) == 0)) {
for (fs = file_systems; fs && strcmp(fs->name, name); fs = fs->next)
;
} else
notify_kerneld_about_using (fs);

#endif

Kerneld could have a timer for each module loaded. After being notified by
the kernel that the module has been used it should reset the timer to the
'delay' value.

This would stop kerneld from for example removing the floppy module just between
mdir a: and mcopy a:patch* or between repeatedly called chat and rest of
pppd.

What do you think about this idea? If you like it and there is nobody
willing to implement it I can be a volunteer.

Jacek Zapala.