[RFC] kldunload -f argument.

Brian Somers brian at Awfulhak.org
Fri Jul 9 04:00:41 PDT 2004


On Fri, 09 Jul 2004 12:42:27 +0200, "Poul-Henning Kamp" <phk at phk.freebsd.dk> wrote:
> In message <20040709113612.40e3a5c8 at dev.lan.Awfulhak.org>, Brian Somers writes:
> 
> >> Comments ?
> >
> >I would have thought a MOD_UNQUIESCE would be required too - maybe called
> >MOD_ACTIVATE (but I don't care much about the name).  It'd make things
> >more orthogonal.
> >
> >When a module is loaded, it would be in a quiescent state allowing only a
> >MOD_UNLOAD or a MOD_ACTIVATE.  It's open for business between MOD_ACTIVATE
> >and MOD_QUIESCE.
> 
> 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).

> >The idea is that the user can be more active in getting rid of the active
> >module by QUIESCEing it, then running around murdering processes before
> >unloading it.
> 
> I could maybe see a point in this but I cannot remember one single instance
> where I would have actually done this myself.

I guess if_tun.ko springs to mind.  I can reliably unload it if I quiesce it,
kill all the ``Opened by PID N'' processes, then unload it.

The MOD_ACTIVATE becomes more useful when a module ends up in a quiescent
state for a long time - the user might want to change their mind instead of
only being allowed to [try to] unload the now useless driver.


Unless anyone's inspired to make any more pragmatic suggestions along these
lines though, it's probably sensible to just skip the ACTIVATE idea :*)

-- 
Brian <brian at Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !


More information about the freebsd-arch mailing list