Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Apr 2002 10:55:40 -0700
From:      Alfred Perlstein <bright@mu.org>
To:        Jeffrey Hsu <hsu@idiom.com>
Cc:        tanimura@r.dl.itc.u-tokyo.ac.jp, current@freebsd.org
Subject:   Re: Locking down a socket, milestone 1
Message-ID:  <20020425175540.GN38320@elvis.mu.org>
In-Reply-To: <200204251750.KAA55721@idiom.com>
References:  <200204241110.g3OB8u8t006194@bunko.unknown> <200204251750.KAA55721@idiom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Jeffrey Hsu <hsu@idiom.com> [020425 10:50] wrote:
> In article <200204241110.g3OB8u8t006194@bunko.unknown> you write:
> >I am now working on locking down a socket.  (I have heard that Jeffrey
> >Hsu is also doing that, but I have never seen his patch.  Has anyone
> >seen that?)
> 
> I have. :-)  I do coarse-grain locking at the inpcb and sockbuf level as
> is done in BSD/OS.  This is a lot simpler than locking down individual
> fields in struct socket.  Are you sure we need such fine-grain locking?

Huh?  BSD/OS's source drop has two locks in each socket and a couple
of global locks for things like the inpcb and such, it's pretty
fine grained except the unix domain sockets where a global lock is
held to protect against lock order reversals when having to lock
both sockets.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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