From owner-freebsd-arch@FreeBSD.ORG Sun Aug 10 07:14:33 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58ECB106564A; Sun, 10 Aug 2008 07:14:33 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 1DCAC8FC13; Sun, 10 Aug 2008 07:14:32 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 99265170E4; Sun, 10 Aug 2008 07:14:31 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m7A7EV8J001688; Sun, 10 Aug 2008 07:14:31 GMT (envelope-from phk@critter.freebsd.dk) To: John Baldwin From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 09 Aug 2008 16:37:33 -0400." <200808091637.33820.jhb@freebsd.org> Date: Sun, 10 Aug 2008 07:14:31 +0000 Message-ID: <1687.1218352471@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org Subject: Re: Make MOD_QUIESCE a bit more useful.. 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: Sun, 10 Aug 2008 07:14:33 -0000 In message <200808091637.33820.jhb@freebsd.org>, John Baldwin writes: >So currently the MOD_QUIESCE event is posted to a module when unloading a kld >so it can veto non-forced unloads. However, the current implementation in >the kernel linker is to run through all the modules in a file, posting >MOD_QUIESCE followed by MOD_UNLOAD on each module serially. Thus, if you >have multiple modules in a single kld and one of the modules veto's an unload >request via MOD_QUIESCE, you don't know as the module author if any of your >modules were unloaded via MOD_UNLOAD or not. I think a better approach would >be to change the kernel linker to invoke MOD_QUIESCE on all modules in a >single pass first. If none of those fail (or it's a forced unload), then it can do a second pass invoking MOD_UNLOAD on all the modules. I thought it already worked that way, so no objection. -- 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.