From owner-freebsd-current@FreeBSD.ORG Thu Nov 27 19:47:04 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C725416A4CF for ; Thu, 27 Nov 2003 19:47:04 -0800 (PST) Received: from basement.kutulu.org (pcp03610121pcs.longhl01.md.comcast.net [68.49.239.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41F3F43F3F for ; Thu, 27 Nov 2003 19:47:03 -0800 (PST) (envelope-from kutulu@kutulu.org) Received: from wombat.localnet (wombat.localnet [192.168.69.3]) by basement.kutulu.org (Postfix) with ESMTP id 6FF21A904; Thu, 27 Nov 2003 22:47:02 -0500 (EST) Received: by wombat.localnet (Postfix, from userid 1001) id 61E29B855; Thu, 27 Nov 2003 22:46:21 -0500 (EST) Date: Thu, 27 Nov 2003 22:46:20 -0500 From: Michael Edenfield To: Kent Stewart Message-ID: <20031128034620.GN15294@wombat.localnet> Mail-Followup-To: Kent Stewart , Bill Moran , walt , freebsd-current@freebsd.org References: <3FC65B59.6060405@myrealbox.com> <3FC65F2D.50404@potentialtech.com> <200311271449.35193.kstewart@owt.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0kRkyLZR5zsR9u2P" Content-Disposition: inline In-Reply-To: <200311271449.35193.kstewart@owt.com> X-Mailer: Mutt http://www.mutt.org/ X-Accept-Language: en X-PGP-Key: http://www.kutulu.org/pgp/kutulu.asc X-PGP-Fingerprint: 1CE0 3C31 7013 D529 406D 37DC 09CC CD84 A46C 878F User-Agent: Mutt/1.5.5.1i cc: walt cc: freebsd-current@freebsd.org cc: Bill Moran Subject: Re: Turkeys and dynamic linking X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2003 03:47:05 -0000 --0kRkyLZR5zsR9u2P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kent Stewart [031127 17:50]: > On Thursday 27 November 2003 12:31 pm, Bill Moran wrote: > > walt wrote: > > > To all of you who celebrate Thanksgiving today, I wish you a happy on= e! > > > > > > And speaking of turkeys, does anyone know how Microsoft handles the > > > performance issues associated with dynamic linking? Do they do > > > anything special, or just ignore the whole thing? > > > > Don't they fix the performance hit by moving performance-critical parts > > of the application into kernel space (such as IIS and MSSQL)? > > > > At least, that's what Eric Raymond claims in his latest book. I don't > > think that's an approach I would like to see FreeBSD take. >=20 > It all depends because if you only have 1 dll loaded for multiple=20 > applications, which is one of the features I understand is built into=20 > Windows, you have real savings. You share the code and own the data. Windows' dynamic linker works in a similar way to what Apple does in terms of sharing dll code. It makes an attempt to load libraries at the same base address in all processes, so that one DLL can be easily mapped into multiple processes. When you build a DLL, you supply a "preferred address" where it should be loaded. If Windows can load the library there, it does so. It also tries to load DLL's in thh same order each time. Since every process in the system likely relies on kernel32.dll, and probably user32.dll and gdi32.dll and others, Windows is almost always able to put those libraries at the same place in each process. So it doesn't have to read kernel32.dll from disk, since the OS itself has it loaded from the beginning. It just needs to do the fixups. For user-defined libraries, there's a decent chance that the same thing will happen. If not, then you have to pay the penalty to remap the library from scratch into a new location.=20 As far as moving things into the kernel, I'm not sure what ESR is referring to. It's easy to get code into kernel-space by making it a device driver, but AFAIK SQL Server code comes all from normal DLL libraries, all in user space. --Mike --0kRkyLZR5zsR9u2P Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/xsUMCczNhKRsh48RAuEzAKC6EXLR5kA/HEwTuhErv89x4ed8LACgwJdl qhwd8wlR6sN5Pb4h1y/YiG4= =bM3S -----END PGP SIGNATURE----- --0kRkyLZR5zsR9u2P--