[PATCH v3 1/2] drm/scheduler: Avoid using wait_event_killable for dying process.

Christian König christian.koenig at amd.com
Mon Jun 4 18:20:00 UTC 2018


Ok that explains it. I was already wondering what the heck I was missing :)

The second patch already looked fine to me as well.

Just send it out once more to get an rb,
Christian.

Am 04.06.2018 um 20:03 schrieb Andrey Grodzovsky:
>
> 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/dri-devel/attachments/20180604/a3ff643b/attachment.html>


More information about the dri-devel mailing list