Date: Sun, 26 Apr 2009 07:09:39 +0000 (UTC) From: Marko Zec <zec@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/kern kern_vimage.c src/sys/sys vimage.h Message-ID: <200904260711.n3Q7BEoR021193@repoman.freebsd.org>
index | next in thread | raw e-mail
zec 2009-04-26 07:09:39 UTC
FreeBSD src repository
Modified files:
sys/kern kern_vimage.c
sys/sys vimage.h
Log:
SVN rev 191508 on 2009-04-26 07:09:39Z by zec
Extend the vnet module registration / initialization framework
first introduced @ r190909 with a vnet module deregistration
service.
kldunloadable modules, which are currently using vnet_mod_register()
to attach their per-vnet initialization routines to the vnet
initialization framework, should call vnet_mod_deregister() before
acknowledging MOD_UNLOAD requests in their mod_event handlers. Such
changes to the existing code base will follow in subsequent commits.
vnet_mod_deregister() does not check whether departing vnet modules
are registered as prerequisites for another module(s), so it should
be used with care. Currently I'm only aware of vnet modules which
are leafs on module dependency graphs that are kldunloadable.
This change also introduces per-vnet module destructor handler, which
calls vnet's module cleanup function, which (if required) has to be
registered in vnet module's vnet_modinfo_t structure .vmi_idetach
field. Once options VIMAGE becomes operational, the framework will
take care that module's cleanup function become invoked for each
active vnet instance, and that the memory allocated for each instance
gets freed. Currently calls to destructor handlers must always
succeed.
Revision Changes Path
1.3 +73 -4 src/sys/kern/kern_vimage.c
1.15 +2 -0 src/sys/sys/vimage.h
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904260711.n3Q7BEoR021193>
