From owner-freebsd-arch@FreeBSD.ORG Fri Jul 9 11:00:41 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 872B416A4CF for ; Fri, 9 Jul 2004 11:00:41 +0000 (GMT) Received: from gw.Awfulhak.org (awfulhak.demon.co.uk [80.177.173.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id 084E543D1F for ; Fri, 9 Jul 2004 11:00:32 +0000 (GMT) (envelope-from brian@Awfulhak.org) Received: from mail.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.12.11/8.12.11) with SMTP id i69Awwxn021616; Fri, 9 Jul 2004 11:59:12 +0100 (BST) (envelope-from brian@Awfulhak.org) Date: Fri, 9 Jul 2004 11:58:58 +0100 From: Brian Somers To: "Poul-Henning Kamp" Message-Id: <20040709115858.47efb729@dev.lan.Awfulhak.org> In-Reply-To: <19893.1089369747@critter.freebsd.dk> References: <20040709113612.40e3a5c8@dev.lan.Awfulhak.org> <19893.1089369747@critter.freebsd.dk> X-Mailer: Sylpheed-Claws 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on gw.lan.Awfulhak.org 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 11:00:41 -0000 On Fri, 09 Jul 2004 12:42:27 +0200, "Poul-Henning Kamp" wrote: > In message <20040709113612.40e3a5c8@dev.lan.Awfulhak.org>, Brian Somers writes: > > >> Comments ? > > > >I would have thought a MOD_UNQUIESCE would be required too - maybe called > >MOD_ACTIVATE (but I don't care much about the name). It'd make things > >more orthogonal. > > > >When a module is loaded, it would be in a quiescent state allowing only a > >MOD_UNLOAD or a MOD_ACTIVATE. It's open for business between MOD_ACTIVATE > >and MOD_QUIESCE. > > 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). > >The idea is that the user can be more active in getting rid of the active > >module by QUIESCEing it, then running around murdering processes before > >unloading it. > > I could maybe see a point in this but I cannot remember one single instance > where I would have actually done this myself. I guess if_tun.ko springs to mind. I can reliably unload it if I quiesce it, kill all the ``Opened by PID N'' processes, then unload it. The MOD_ACTIVATE becomes more useful when a module ends up in a quiescent state for a long time - the user might want to change their mind instead of only being allowed to [try to] unload the now useless driver. Unless anyone's inspired to make any more pragmatic suggestions along these lines though, it's probably sensible to just skip the ACTIVATE idea :*) -- Brian Don't _EVER_ lose your sense of humour !