[OpenAFS-devel] afs_osi_Sleep and afs_osi_Wakeup on Linux
Srikanth Vishwanathan
vsrikanth@in.ibm.com
Tue, 4 Jun 2002 15:17:14 -0400
> didnt drop the GLOCK. if you keep afs_getevent from dropping the lock
> there is no reason that afs_getevent and afs_addevent cant be merged back
> together.
I guess it finally boils down to whether or not it is possible to
have a version of linux_alloc() that does not drop GLOCK.
chas williams
<chas@cmf.nrl.nav To: Srikanth Vishwanathan/India/IBM@IBMIN
y.mil> cc: "openafs-devel" <openafs-devel@openafs.org>, openafs-devel-admin@openafs.org
Subject: Re: [OpenAFS-devel] afs_osi_Sleep and afs_osi_Wakeup on Linux
06/04/2002 03:14
PM
Please respond to
chas williams
In message <OFC1602E42.3EC66AAB-ON85256BCE.00630636@in.ibm.com>,"Srikanth
Vishw
anathan" writes:
>If afs_getevent() returns NULL, sleep will return prematurely. But this
>is no different from a spurious wakeup. The caller makes sure that sleep
>is called in a "while(condition not satisfied) sleep" loop that takes
>care of this.
the while() does handle the condition for a spurious wakeup. i believe
all the parts have been found in the afs code that dont loop but you
never know.
however, it probably is still not a good idea to drop the GLOCK during
afs_addevent(). since your previous race was related to GLOCK's being
droppped too soon, it would probably be best if afs_addevent/afs_getevent
didnt drop the GLOCK. if you keep afs_getevent from dropping the lock
there is no reason that afs_getevent and afs_addevent cant be merged back
together.