From owner-svn-src-head@FreeBSD.ORG Sat Jun 11 19:58:57 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C738F1065676; Sat, 11 Jun 2011 19:58:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A1D128FC16; Sat, 11 Jun 2011 19:58:57 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id EEE8546B35; Sat, 11 Jun 2011 15:58:56 -0400 (EDT) Date: Sat, 11 Jun 2011 20:58:56 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Doug Barton In-Reply-To: <4DF3B12C.8020505@FreeBSD.org> Message-ID: References: <201106110908.p5B98kkE066709@svn.freebsd.org> <4DF3B12C.8020505@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Joel Dahl Subject: Re: svn commit: r222980 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2011 19:58:57 -0000 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