On 29.06.2005 [11:14:40 -0700], Libor Michalek wrote: > On Tue, Jun 28, 2005 at 01:48:55PM -0700, Nishanth Aravamudan wrote: > > > > Using schedule_timeout() without setting the state first is broken and > > causes schedule_timeout() to return immediately (effectively you call > > schedule() without changing your state and are thus going to run again). > > In each of these loops in sdp_inet.c involving schedule_timeout(), the > > first iteration is correct, but subsequent ones result in busy-wait. Add > > the appropriate set_current_state() call to fix the issue. > > Nish, > > Thank you for the patch. I'm wondering if it would be better to just > move the existing call to set_current_state(TASK_INTERRUPTIBLE) from > outside the loop to inside at the begining, as below?
The problem with that change is that since the task-state has not changed, you may miss some signal-related wake-ups before you set the state. Really, you probably could use prepare_to_wait() and finish_wait() for all of this? Thanks, Nish _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
