]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/sched: Improve teardown documentation
authorPhilipp Stanner <pstanner@redhat.com>
Tue, 5 Nov 2024 14:31:38 +0000 (15:31 +0100)
committerPhilipp Stanner <pstanner@redhat.com>
Thu, 7 Nov 2024 09:05:54 +0000 (10:05 +0100)
commitbaf4afc5831438b35de4b0e951b9cd58435a6d99
treea24612e36300c416e6afbad48fd23d5c6ac0b12d
parent21c23e4b64e360d74d31b480f0572c2add0e8558
drm/sched: Improve teardown documentation

If jobs are still enqueued in struct drm_gpu_scheduler.pending_list
when drm_sched_fini() gets called, those jobs will be leaked since that
function stops both job-submission and (automatic) job-cleanup. It is,
thus, up to the driver to take care of preventing leaks.

The related function drm_sched_wqueue_stop() also prevents automatic job
cleanup.

Those pitfals are not reflected in the documentation, currently.

Explicitly inform about the leak problem in the docstring of
drm_sched_fini().

Additionally, detail the purpose of drm_sched_wqueue_{start,stop} and
hint at the consequences for automatic cleanup.

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241105143137.71893-2-pstanner@redhat.com
drivers/gpu/drm/scheduler/sched_main.c