From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 17 08:08:44 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3DB4916A4CE for ; Wed, 17 Dec 2003 08:08:44 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEEDE43D70 for ; Wed, 17 Dec 2003 08:08:16 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id hBHG7pUd036859; Wed, 17 Dec 2003 11:07:51 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)hBHG7p7C036856; Wed, 17 Dec 2003 11:07:51 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 17 Dec 2003 11:07:50 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Alexander Kabaev In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: Ted Unangst Subject: Re: patch: portable dirhash X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2003 16:08:44 -0000 On Wed, 17 Dec 2003, Robert Watson wrote: > On Wed, 17 Dec 2003, Alexander Kabaev wrote: > > > On Tue, 16 Dec 2003 22:12:08 -0500 (EST) > > Ted Unangst wrote: > > > > > can somebody please review/commit this to freebsd? it is most of the > > > differences to permit openbsd to use the code. it should not change > > > the code in any functional way. > > > > I do not think there is any point in this code ever hitting FreeBSD CVS > > repository. Rather, OpenBSD should just take cleaned-out copy of this > > code and be done with it. > > Well, it's true the #ifdef OpenBSD's probably don't help the readability > of our code, abstracting a step by using macros to wrap specific locking > primitives is a widely used approach in the FreeBSD tree, especially > where it's not clear a final locking strategy has been developed due to > a lack of profiling. For example, in both the network code and process > management code, we wrap mutexes/sxlocks in macros to avoid committing > to either, and to make changing the strategy easier. I wouldn't object > to our adopting the macro wrapping, which would have the side effect of > helping the OpenBSD patch size a lot also, even leaving out the > #ifdef's. That said, LOCK() is a terrible name for a macro. :-) If anything, it should be DIRHASH_LOCK() or the like. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research