[Port-solaris] bozonlock

Mark Vitale mvitale@sinenomine.net
Thu, 3 Jul 2014 22:15:54 +0000


I'm hoping someone on the list can provide more historical background on th=
e "bozonlock" (AFS_BOZONLOCK_ENV, vcache->pvnLock).  By reading how it is u=
sed in code, it is clearly intended to only allow one thread at a time to i=
nteract with the paging subsystem for a given vcache's memory-mapped pages.=
  This is also alluded to in the name "pvnLock" - paged vnode lock. =20

Some code comments (1) imply that bozonlock was originally intended for use=
 in the Solaris port.  However, sometime before IBM 1.0, it was specificall=
y disabled for Solaris by the addition of #define AFS_NOBOZO_LOCK (2).

Currently bozonlock function (AFS_BOZONLOCK_ENV 1) is only defined for the =
Darwin port (and DUX).

Does anyone know why bozonlock was disabled for Solaris?  Does anyone know =
any reason why it could/should not be reinstated for Solaris?

Thanks,
--
Mark Vitale
mvitale@sinenomine.net

(1) from src/afs/afs_lock.c:=20
#ifdef AFS_BOZONLOCK_ENV
/* operations on locks that don't mind if we lock the same thing twice.  I'=
d like to dedicate
    this function to Sun Microsystems' Version 4.0 virtual memory system, w=
ithout
    which this wouldn't have been necessary */
void
afs_BozonLock(struct afs_bozoLock *alock, struct vcache *avc)
...


(2) Recently Andrew Deason (in commit 8017773587bf28a58e480f634fdccc287c443=
d3b) explained and simplified the conditional logic for the AFS bozonlock; =
he eliminated AFS_NOBOZO_LOCK and extended AFS_BOZONLOCK_ENV to essentially=
 preserve the existing usage.  So even though AFS_NOBOZO_LOCK no longer exi=
sts on master, Solaris is still not using the bozonlock.   =