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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux