]> git.baikalelectronics.ru Git - kernel.git/commit
drm/scheduler: Avoid using wait_event_killable for dying process (V4)
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 30 May 2018 19:11:01 +0000 (15:11 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jun 2018 17:20:33 +0000 (12:20 -0500)
commit28802e78c52491c3c2b4a173fc2341cab901e7c4
treeea4ec8a08aeccc3583b7faa778fd0f58b40da593
parentb4dde2b03c65fc0cffb26f52f28915ddebec9ab4
drm/scheduler: Avoid using wait_event_killable for dying process (V4)

Dying process might be blocked from receiving any more signals
so avoid using it.

Also retire enity->fini_status and just check the SW queue,
if it's not empty do the fallback cleanup.

Also handle entity->last_scheduled == NULL use case which
happens when HW ring is already hangged whem a  new entity
tried to enqeue jobs.

v2:
Return the remaining timeout and use that as parameter for the next call.
This way when we need to cleanup multiple queues we don't wait for the
entire TO period for each queue but rather in total.
Styling comments.
Rebase.

v3:
Update types from unsigned to long.
Work with jiffies instead of ms.
Return 0 when TO expires.
Rebase.

v4:
Remove unnecessary timeout calculation.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/scheduler/gpu_scheduler.c
include/drm/gpu_scheduler.h