[OpenAFS-devel] afs_osi_Sleep and afs_osi_Wakeup on Linux

Derrick J Brashear shadow@dementia.org
Wed, 5 Jun 2002 16:08:05 -0400 (EDT)


On Wed, 5 Jun 2002, chas williams wrote:

> 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.

so why not add addevent to all the systypes and call it everywhere,
always. 

> 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.

trading one set of side effects for another isn't really a win, you just
piss off a different group of users