From owner-freebsd-arch@FreeBSD.ORG Fri Jul 9 14:36:16 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AE8616A4CE; Fri, 9 Jul 2004 14:36:16 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9488443D39; Fri, 9 Jul 2004 14:36:15 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i69Ea6B6023762; Fri, 9 Jul 2004 16:36:06 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Robert Watson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 09 Jul 2004 10:32:15 EDT." Date: Fri, 09 Jul 2004 16:36:05 +0200 Message-ID: <23761.1089383765@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: Brian Somers cc: arch@freebsd.org Subject: Re: [RFC] kldunload -f argument. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 14:36:16 -0000 In message , Robert Watson writes: > >On Fri, 9 Jul 2004, Brian Somers wrote: > >> > I'm not sure I see any real-world application for this ? Can you give an >> > example ? Why would you load a module and not use it ? >> >> I can't think of any non-development-environment reasons unless there's >> room for modules being loaded early to be able to make assumptions about >> their environment at ACTIVATE time (such as a root filesystem being >> available). > >We actually have an example in the form of snd_driver, which forces all >the sound modules to load, with the intent that when you unload, the >attached ones are left running. We also have a lot of functionality >compiled into GENERIC that many people don't use or use only infrequently >-- when that functionality is compiled into modules, we frequently >automatically load modules during a file system mount, netgraph pieces, >etc. When they're no longer in use, they hang around. In a world where >we consistently load modules on demand, and those modules remain idle >after use, it would be somewhat nice to be able to simply say "Ok, modules >no longer needed, please unload yourselves". Yes, but I found out why this is troublesome: Modules != KLD. One KLD may contain multiple modules. I think that if we need activate/quiesce on a per module interface then we should not do it with KLD granularity. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.