From owner-cvs-src@FreeBSD.ORG Mon Nov 26 10:35:00 2007 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FAE416A420; Mon, 26 Nov 2007 10:35:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2D39113C4E7; Mon, 26 Nov 2007 10:35:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 955A9474F2; Mon, 26 Nov 2007 05:38:32 -0500 (EST) Date: Mon, 26 Nov 2007 10:34:52 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <474A6274.9060601@elischer.org> Message-ID: <20071126103225.T65286@fledge.watson.org> References: <200711081447.lA8EltXO052057@repoman.freebsd.org> <47492064.7080108@freebsd.org> <4749B971.3000703@elischer.org> <474A6274.9060601@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Stephan Uphoff , cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Daniel Eischen Subject: Re: cvs commit: src/share/man/man9 locking.9 rmlock.9 src/sys/conf files src/sys/kern kern_rmlock.c subr_lock.c subr_pcpu.c subr_smp.c src/sys/sys _rmlock.h lock.h pcpu.h rmlock.h smp.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2007 10:35:00 -0000 On Sun, 25 Nov 2007, Julian Elischer wrote: >> Do we need both? > > Well, we need something but it could be that the naming was unfortunate. I think there's a strong argument to be made that we should try and align the rmlock and rwlock primitives in API and data structures, if it doesn't royally break things, because that way the probability of read/write can be expressed as a hint when initializing the lock (i.e., RW_WRITEUNLIKELY) and then tuned opaquely. In the case of rwlock and rmlock, we consider both to be bounded sleep primitives, so semantically similar (and getting more so, I think). Likewise, I'm not opposed to the idea of deprecating sleep mutexes and replacing them entirely with rwlocks used only in an exclusive way, although I'm not actively advocating the change. Robert N M Watson Computer Laboratory University of Cambridge