[RFC] kldunload -f argument.
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri Jul 9 07:36:16 PDT 2004
In message <Pine.NEB.3.96L.1040709102423.60816K-100000 at fledge.watson.org>, Robert Watson writes:
>
>On Fri, 9 Jul 2004, Brian Somers wrote:
>
>> > I'm not sure I see any real-world application for this ? Can you give an
>> > example ? Why would you load a module and not use it ?
>>
>> I can't think of any non-development-environment reasons unless there's
>> room for modules being loaded early to be able to make assumptions about
>> their environment at ACTIVATE time (such as a root filesystem being
>> available).
>
>We actually have an example in the form of snd_driver, which forces all
>the sound modules to load, with the intent that when you unload, the
>attached ones are left running. We also have a lot of functionality
>compiled into GENERIC that many people don't use or use only infrequently
>-- when that functionality is compiled into modules, we frequently
>automatically load modules during a file system mount, netgraph pieces,
>etc. When they're no longer in use, they hang around. In a world where
>we consistently load modules on demand, and those modules remain idle
>after use, it would be somewhat nice to be able to simply say "Ok, modules
>no longer needed, please unload yourselves".
Yes, but I found out why this is troublesome: Modules != KLD.
One KLD may contain multiple modules.
I think that if we need activate/quiesce on a per module interface then we
should not do it with KLD granularity.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-arch
mailing list