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

Robert Watson rwatson at FreeBSD.org
Mon Nov 26 02:35:00 PST 2007


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


More information about the cvs-src mailing list