Re: [PATCH] drm/scheduler: fix timeout worker setup for out of order job completions

2018-08-03 Thread Christian König
Am 03.08.2018 um 16:09 schrieb Lucas Stach: Hi Christian, Am Freitag, den 03.08.2018, 15:51 +0200 schrieb Christian König: Hi Lucas, thanks a lot for taking care of that, but there is one thing you have missed: It is perfectly possible that the job is the last one on the list and

Re: [PATCH] drm/scheduler: fix timeout worker setup for out of order job completions

2018-08-03 Thread Lucas Stach
Hi Christian, Am Freitag, den 03.08.2018, 15:51 +0200 schrieb Christian König: > Hi Lucas, > > thanks a lot for taking care of that, but there is one thing you have  > missed: > > It is perfectly possible that the job is the last one on the list and  > list_next_entry() doesn't test for that,

Re: [PATCH] drm/scheduler: fix timeout worker setup for out of order job completions

2018-08-03 Thread Christian König
Hi Lucas, thanks a lot for taking care of that, but there is one thing you have missed: It is perfectly possible that the job is the last one on the list and list_next_entry() doesn't test for that, e.g. it never return NULL. BTW: There are also quite a lot of other things we could

[PATCH] drm/scheduler: fix timeout worker setup for out of order job completions

2018-08-03 Thread Lucas Stach
drm_sched_job_finish() is a work item scheduled for each finished job on a unbound system workqueue. This means the workers can execute out of order with regard to the real hardware job completions. If this happens queueing a timeout worker for the first job on the ring mirror list is wrong, as