On Sat, 11 Jun 2011, Doug Barton wrote:
On 6/11/2011 6:07 AM, Robert Watson wrote:
To me, this seems like the wrong direction. Over the last decade, we've
been trying to move away from conditional compilation of features to having
them be loadable as modules.
FWIW, I agree. I'm wondering though, is there still a performance penalty
for modules? My understanding in the past was that there is, although for
most use cases it's in the statistical noise. Is that still true?
I think there's two aspects to the question:
(1) What effect does using modules have on boot time?
(2) What effect does using modules have in the run-time performance of
features they implement (or features they interact with in the base kernel
or other modules)?
I don't know too much about the former, but when it comes to the latter, it's
really down to the subsystem in question. Making things more dynamic implies
more need for synchronisation. In some places, the synchronisation is
probably about right -- in other places, it might be too heavy (poor
performance), or too light (synchronisation bugs, perhaps, or especially, on
dynamic load/unload). For a while, dynamically loaded system calls, for
example, incured extra synchronisation overhead (and still might). And in the
MAC Framework, modules that have been loaded dynamically, and might be
unloaded dynamically, require more synchronisation coming in from the kernel
in order to ensure they can't be unloaded while in execution. However, in the
big picture, and for many features (especially device drivers and file
systems), this doesn't appear to be measurable as far as I can tell.
Robert
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"