From owner-freebsd-arch@FreeBSD.ORG Sat Jun 11 17:29:03 2011 Return-Path: Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA0E5106564A; Sat, 11 Jun 2011 17:29:03 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 93E808FC0A; Sat, 11 Jun 2011 17:29:03 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.4/8.14.2) with ESMTP id p5BHIZam038335; Sat, 11 Jun 2011 13:18:35 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.4/8.14.2/Submit) id p5BHIZIh038334; Sat, 11 Jun 2011 13:18:35 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 11 Jun 2011 13:18:35 -0400 From: David Schultz To: Adrian Chadd Message-ID: <20110611171834.GA38142@zim.MIT.EDU> Mail-Followup-To: Adrian Chadd , freebsd-arch@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-arch@FreeBSD.ORG Subject: Re: [RFC] shipping kernels with default modules? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2011 17:29:03 -0000 On Sat, Jun 11, 2011, Adrian Chadd wrote: > Hi guys, > > Has there been any further thought as of late about shipping kernels > with modules only by default, rather than monolithic kernels? > > I tried this experiment a couple years ago and besides a little > trickery with ACPI module loading, it worked out fine. > > Is there any reason we aren't doing this at the moment? Eg by having a > default loader modules list populated from the kernel config file? I've been doing this for years, and it has come in quite handy. For instance, when my if_msk gets wedged, the only way to fix it short of rebooting seems to be reloading the driver. One issue, however, is that the boot loader is horrendously slow at loading modules. (Either that or my BIOS has a braindead int 13h handler.) Most of these modules aren't actually needed until much later in the boot process, so a mechanism to load non-essential modules after the file systems are mounted might provide a good solution. OS X has an interesting solution, intended to preserve the flexibility of dynamic modules, while minimizing boot time. It provides a kextcache utility, which packages the kernel and all of the needed modules into a single binary for better locality on disk. Unlike recompiling the kernel, running kextcache is fast, and the system runs it automatically when hardware or driver changes necessitate it.