Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Dec 2000 17:48:40 -0600 (CST)
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        jhb@FreeBSD.ORG, smp@FreeBSD.ORG
Subject:   Re: Netgraph and SMP
Message-ID:  <200012042348.eB4NmeA73673@prism.flugsvamp.com>
In-Reply-To: <local.mail.freebsd-smp/XFMail.001204144630.jhb@FreeBSD.org>
References:  <local.mail.freebsd-smp/200012042250.eB4Mo7F01738@mass.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-smp/XFMail.001204144630.jhb@FreeBSD.org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012042348.eB4NmeA73673>