Re: Thoughts On Loadable Modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Karl Dahlke writes:

>  5. Once loaded, is the module ever really inactive?
>  As a point of precedent, a file system module is active
>  as long as a partition of that type is mounted.
>  Yet /dev/console is always open,
>  hence blinux is always active.
>  This brings up the question of how we would rmmod and insmod it on the fly,
>  a capability that I really want.

This problem is well known by the GGI folks, working on video card
drivers.  One solution is to insmod the new module while the old
module is still present (using an insmod option to give it another
name, -o I think).  The new module's init function will override the
hooks of the old module, via some RegisterFoo kernel function, which
calls the old module's Release function, decrementing the usage count,
and allowing the old module to be rmmoded.

>  another problem.  The kmod utility automatically deinstalls
>  modules that are not in use.
>  No input/output activity for a minute, and kmod might just yank your
>  blinux module.

Make the module's init function increment the usage count.  Then the
only way to remove the module is to insmod another one, as described

Hope that helps.

\/   Andrew Apted  <ajapted@xxxxxxxxxxxxxxxxxxxxx>

[Index of Archives]     [Linux for the Blind]     [Fedora]     [Kernel List]     [Red Hat Install]     [Red Hat Watch List]     [Red Hat Development]     [Gimp]     [Yosemite News]     [Big List of Linux Books]