From owner-freebsd-current Thu Apr 25 10:55:45 2002 Delivered-To: freebsd-current@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 8FAF637B419 for ; Thu, 25 Apr 2002 10:55:40 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 5FA32AE1C1; Thu, 25 Apr 2002 10:55:40 -0700 (PDT) Date: Thu, 25 Apr 2002 10:55:40 -0700 From: Alfred Perlstein To: Jeffrey Hsu 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> References: <200204241110.g3OB8u8t006194@bunko.unknown> <200204251750.KAA55721@idiom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200204251750.KAA55721@idiom.com> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Jeffrey Hsu [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