Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jun 2011 20:58:56 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Joel Dahl <joel@FreeBSD.org>
Subject:   Re: svn commit: r222980 - in head/sys: amd64/conf i386/conf
Message-ID:  <alpine.BSF.2.00.1106112055560.10365@fledge.watson.org>
In-Reply-To: <4DF3B12C.8020505@FreeBSD.org>
References:  <201106110908.p5B98kkE066709@svn.freebsd.org> <alpine.BSF.2.00.1106111403060.44950@fledge.watson.org> <4DF3B12C.8020505@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1106112055560.10365>