]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/sched: fix the bug of time out calculation(v4)
authorMonk Liu <Monk.Liu@amd.com>
Wed, 1 Sep 2021 00:46:46 +0000 (08:46 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Sep 2021 20:55:12 +0000 (16:55 -0400)
commitb8430770b55cf7af011c8e2681a86b03d9787f4a
tree80615fca360bb3541b72087d9673ff920ff8c423
parentc26ef7440fff9ae704051dc72238377401024693
drm/sched: fix the bug of time out calculation(v4)

issue:
in cleanup_job the cancle_delayed_work will cancel a TO timer
even the its corresponding job is still running.

fix:
do not cancel the timer in cleanup_job, instead do the cancelling
only when the heading job is signaled, and if there is a "next" job
we start_timeout again.

v2:
further cleanup the logic, and do the TDR timer cancelling if the signaled job
is the last one in its scheduler.

v3:
change the issue description
remove the cancel_delayed_work in the begining of the cleanup_job
recover the implement of drm_sched_job_begin.

v4:
remove the kthread_should_park() checking in cleanup_job routine,
we should cleanup the signaled job asap

TODO:
1)introduce pause/resume scheduler in job_timeout to serial the handling
of scheduler and job_timeout.
2)drop the bad job's del and insert in scheduler due to above serialization
(no race issue anymore with the serialization)

Tested-by: Jingwen Chen <Jingwen.Chen2@amd.com>
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/scheduler/sched_main.c