Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
17342
Description
condition function of l_wait_event really should an bool expression or a very lightweight non-sleeping function, otherwise we may run into very unexpected situation. However, this is not always true, we may have very expensive condition function, a typical use-case is ptlrpcd_check() in ptlrpcd, it may iterate a long list and send RPCs, even worse, it can call cond_resched(), this is very dangerous, because l_wait_event() will set status of current thread to TASK_INTERRUPTIBLE, now if ptlrpcd_check() called schedule() and there is no new event for this ptlrpcd, then this thread may hang forever.
This could be difficult to check all cases and fix them, but we need a ticket as memo...