From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 17 08:02:01 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 8056B16A4CF for ; Wed, 17 Dec 2003 08:02:01 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22AA843D46 for ; Wed, 17 Dec 2003 08:02:00 -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 hBHG1YUd036744; Wed, 17 Dec 2003 11:01:34 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)hBHG1Yq3036741; Wed, 17 Dec 2003 11:01:34 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 17 Dec 2003 11:01:33 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Alexander Kabaev In-Reply-To: <20031217101415.58d0e1fa.ak03@gte.com> 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:02:01 -0000 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. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research