From owner-freebsd-hackers Wed Mar 19 19:01:52 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA19406 for hackers-outgoing; Wed, 19 Mar 1997 19:01:52 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA19391 for ; Wed, 19 Mar 1997 19:01:42 -0800 (PST) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id NAA00691; Thu, 20 Mar 1997 13:28:20 +1030 (CST) From: Michael Smith Message-Id: <199703200258.NAA00691@genesis.atrad.adelaide.edu.au> Subject: Re: wd driver questions In-Reply-To: <199703200234.TAA12885@phaeton.artisoft.com> from Terry Lambert at "Mar 19, 97 07:34:02 pm" To: terry@lambert.org (Terry Lambert) Date: Thu, 20 Mar 1997 13:28:20 +1030 (CST) Cc: msmith@atrad.adelaide.edu.au, terry@lambert.org, bde@zeta.org.au, dgy@rtd.com, hackers@FreeBSD.ORG, helbig@MX.BA-Stuttgart.De X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Terry Lambert stands accused of saying: > > > Yes. This should go. So should all configuration options that > > > cause conditional compilation of code rather than conditional > > > inclusion of objects in the link which extend a global linker set. > > > > That's a lot harder. I would say "some" rather than "all". > > Can you, off the top of your head, think of any code that can be > conditionally compiled, but should not be made modular? About the > only code I can think of is the "#if DEBUG" type code. That's the one. There's also quite a lot of code whose behaviour depends on various other options, but it would be practical in the short term to just compile several times with the sensible combinations of the various options and produce different modules. (I am thinking here fe. of NFS_NOSERVER) > If you > localize the "#if DEBUG" as "#if DEBUG_SUBSYSTEM", and create a > depedency for the subsystem (by linking it to a single object before > linking it to the kernel) than that should go away as well, or at > least become sufficiently comparmentalized that you don't have the > structures changing out from under you when some modules are compiled > with the conditional and some are compiled without. Debugging should always have been on a per-module basis; having a single kernelwide "DEBUG" define is clumsy. However 'debug subsystem' implies always-present debug hooks, which can be expensive. I don't like that much. > Specifically, I'd like to see options for kernel resource management > handled via linker-set agregated data structures, highed bidder in the > set wins (or better, agregate wins). This would let me provide minimal > per-module resource requirements on a per-module basis, and still let me > override by commiting an addition 'n' resources. Big win; for instance > mbuf counts for big server sites, max subprocess counts for big user > sites, etc.. Most of that would be better handled (as implied by Doug R.) by a persistent attribute store (that R word) and dynamic allocation. I can't see myself loading a module with nothing but 1024 mbufs in its BSS 8) > > Understood; the point merely being that much of the kernel may be > > required _before_ there is any method available again to load the bits > > that were left out. A standalone boot-time linker and associated > > media drivers are going to be long gone before the kernel is in a > > position to talk to the media again. > > If you can read the blocks, and the load was sparse, you can fill in > the sparse pieces. You are still not listening 8); I have just said "when you discover you need the blocks, you can no longer read them because your load source has gone." This is an issue for the period from when control is transferred to the loaded kernel from the linker until a filesystem is mounted, and thus all the code that could possibly be required over that interval must be present. > Terry Lambert -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[