From owner-freebsd-arch@FreeBSD.ORG Wed Jul 14 00:15:49 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 3A41516A4CE; Wed, 14 Jul 2004 00:15:49 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id B615643D31; Wed, 14 Jul 2004 00:15:48 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.11/8.12.11) with ESMTP id i6E0EGgF055972; Tue, 13 Jul 2004 18:14:16 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 13 Jul 2004 18:14:19 -0600 (MDT) Message-Id: <20040713.181419.82427717.imp@bsdimp.com> To: rwatson@freebsd.org From: "M. Warner Losh" In-Reply-To: References: <20040713.174512.11239675.imp@bsdimp.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: arch@freebsd.org cc: phk@phk.freebsd.dk Subject: Re: newbus integration of MOD_QUIESCE 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: Wed, 14 Jul 2004 00:15:49 -0000 In message: Robert Watson writes: : MOD_WEAKUNLOAD - Unload if you're not in use. I.e., unattached driver, : unmounted file system, netgraph nodes that aren't instantiated, network : protocol without any sockets, etc. Be harmlessly gone, but vetoed : at a low cost. This is desirable. : MOD_STRONGUNLOAD - Unload even though you're in use. Detach the driver, : deadfs the file system, wither the geom, sever the sockets, etc. May : cause disruption, but may also veto, depending on the subsystem, : especially if the subsytem has no way to notify its consumers of : impending doom. Can be vetoed, but try harder before vetoing. Some : subsystems might always return EBUSY for this if there's really no way : to express "undesirable departure" upwards. This is tue current MOD_UNLOAD : MOD_QUIESCE - Attempt MOD_WEAKUNLOAD, and if that fails, ask the module to : start draining in some form. I'm a bit unclear on quite what's : intended, but this seems to be less atomic notion than "unload, or : don't" at various points on the spectrum. I.e., it kicks off a state : transition in what is likely a slightly poorly defined state machine. : Right now, the state machine is "Not loaded", "Loaded", and we use a : lock to prevent intermediate states from colliding. This is the heart of my questions about MOD_QUIESCE. Warner