[PATCH v3 1/2] drm/scheduler: Avoid using wait_event_killable for dying process.
Andrey Grodzovsky
Andrey.Grodzovsky at amd.com
Mon Jun 4 18:03:02 UTC 2018
I reread the documentation for wait_event_timeout, my bad, all this time
i assumed it returns
amount of jiffies he spent in waiting while actually it returns "the
remaining jiffies (at least 1)
if the @condition evaluated
* to %true before the @timeout elapsed."
Will fix that, please take a look also at the second patch.
Andrey
On 06/04/2018 01:53 PM, Christian König wrote:
>> + ret = wait_event_timeout(
>> + sched->job_scheduled,
>> + drm_sched_entity_is_idle(entity),
>> + timeout);
>> +
>> + ret = ret ? timeout - ret : ret;
>
> Ok we still seem to have a misunderstanding here what
> wait_event_timeout() returns.
>
> As far as I know that line shouldn't be necessary and is actually
> quite harmful.
>
> Apart from that this patch looks fine to me now,
> Christian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180604/f14fb3d8/attachment.html>
More information about the amd-gfx
mailing list