From owner-freebsd-smp Wed Dec 6 16: 4:37 2000 From owner-freebsd-smp@FreeBSD.ORG Wed Dec 6 16:04:35 2000 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mail.interware.hu (mail.interware.hu [195.70.32.130]) by hub.freebsd.org (Postfix) with ESMTP id 166DA37B400; Wed, 6 Dec 2000 16:04:34 -0800 (PST) Received: from kampala-40.budapest.interware.hu ([195.70.52.232] helo=elischer.org) by mail.interware.hu with esmtp (Exim 3.16 #1 (Debian)) id 143oXy-0007qv-00; Thu, 07 Dec 2000 01:04:26 +0100 Sender: julian@FreeBSD.ORG Message-ID: <3A2E520E.5E4444BD@elischer.org> Date: Wed, 06 Dec 2000 06:49:50 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Brian Somers Cc: smp@FreeBSD.org, archie@FreeBSD.org Subject: Re: Netgraph and SMP References: <200012051902.eB5J20Y38879@hak.lan.Awfulhak.org> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Brian Somers wrote: > > I don't think netgraph is the place to deal with this. > > kldunload should be smart enough to do several things: > > Look at the dependency graph that it maintains (does it?) and > decide if there are any dependent modules. If they are, refuse > the unload request. I be;ieve this is already done (but am not totally sure) > > Inside it's own lock (preventing any other dependent modules from > appearing), it asks the module if it's ok to unload. > > This is obviously more tricky than it sounds. We've got to ensure > that if any character device entry points have been created > (make_dev() etc), we block the relevant entry points so that we can > ENODEV if the MOD_UNLOAD works. but what if the process has already entered the driver? > > Apart from the generic cdevsw entry points and module dependencies, I > think it's pretty much up to the module to ensure that things work - > unless someone can think of another way that an external source can > use the module (sysctls spring to mind). yep > -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Budapest v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message