[OpenAFS-devel] afs_osi_Sleep and afs_osi_Wakeup on Linux

chas williams chas@cmf.nrl.navy.mil
Wed, 05 Jun 2002 15:06:38 -0400


In message <Pine.LNX.4.44L-026.0206051450170.31640-100000@trafford.andrew.cmu.e
du>,Derrick J Brashear writes:
>going to sleep with the GLOCK isn't likely to result in fewer "strange
>side effects".

is this case it is though.  splitting the afs_getevent() into a 
getevent and addevent isnt going to solve the problem because no 
one went back through the code and called add_event before any
sleeps/wakeups.  since add_event is called before the sleep and
needs to use alloc to get something actually sleep (we cant put
it on the wait queue until we have it) on it gunlocks and possibly
allows a wakeup to get by.

i really think its a bad idea for alloc to unlock/lock the glock
especially in this case since isnt an easy work around for the
above situation.