[OpenAFS-devel] afs_osi_Sleep and afs_osi_Wakeup on Linux

Srikanth Vishwanathan vsrikanth@in.ibm.com
Tue, 4 Jun 2002 11:25:41 -0400


> 'more correct' fix to the trouble with the event mechanism.  i removed
> the interruptible_sleep_on()'s and the afs_addevent().  removing the
> afs_addevent though means i need to call kmalloc directly since you
> cant let the GLOCK be dropped.  a possible fix might be to not drop
> GLOCK for osi_AllocSmallSpace().  comments?  this code would need a

Using kmalloc means a memory leak when you stop AFS. I don't think
afs_getevent() and afs_addevent() should be a problem. How about just
replacing sleep and wake_up with add_wait_queue/remove_wait_queue ?

> a possible fix might be to not drop GLOCK for osi_AllocSmallSpace().

I don't know is this is possible. But we don't drop GLOCK on other
OSes. I guess we need to drop GLOCK because we call vmalloc() and
schedule() in a loop in linux_alloc().