Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2007 10:34:52 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Stephan Uphoff <ups@freebsd.org>, cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, Daniel Eischen <eischen@vigrid.com>
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
Message-ID:  <20071126103225.T65286@fledge.watson.org>
In-Reply-To: <474A6274.9060601@elischer.org>
References:  <200711081447.lA8EltXO052057@repoman.freebsd.org> <47492064.7080108@freebsd.org> <Pine.GSO.4.64.0711251207590.8538@sea.ntplx.net> <4749B971.3000703@elischer.org> <Pine.GSO.4.64.0711260008090.11036@sea.ntplx.net> <474A6274.9060601@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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



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