From owner-freebsd-smp Mon Dec 4 15:51: 1 2000 From owner-freebsd-smp@FreeBSD.ORG Mon Dec 4 15:50:59 2000 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 5C06837B400; Mon, 4 Dec 2000 15:50:59 -0800 (PST) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id eB4NmeA73673; Mon, 4 Dec 2000 17:48:40 -0600 (CST) (envelope-from jlemon) Date: Mon, 4 Dec 2000 17:48:40 -0600 (CST) From: Jonathan Lemon Message-Id: <200012042348.eB4NmeA73673@prism.flugsvamp.com> To: jhb@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: Netgraph and SMP X-Newsgroups: local.mail.freebsd-smp In-Reply-To: References: Organization: Cc: Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In article you write: > >On 04-Dec-00 Mike Smith wrote: >>> > The simplest structure for this is a shared/exclusive lock >>> > that supports intention; Terry would have ranted about this. (He would >>> > have called it a SIX-lock, I think). >>> [.....] >>> > This may sound simplistic, but given that you don't necessarily make >>> > changes to Netgraph very often, this is quite likely more than adequate >>> > for now. >>> >>> Nice, I never realised there were shared/exclusive locks available. >>> I think netgraph nodes would also need to have a ``modevent'' that >>> fails MOD_UNLOAD events if any locks are outstanding. >> >> Er, no, you just have to acquire the exclusive lock in the MOD_UNLOAD >> handler. >> >> As for the actual availibility of SIX-style locks; I'm fairly sure you >> can do this with the lockmgr. > >Yes. See the allproc_lock as an example. Let's get realistic here. We're not going to get a shared lockmgr lock for every stinking packet that comes into the network. While SIX locks (or semaphore, or shared reader/writer) is nice in theory, I think the performance impact is too much for this particular case. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message