summaryrefslogtreecommitdiff
path: root/rust/helpers/workqueue.c
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>2025-07-16 09:51:17 +0100
committerPhilipp Stanner <phasta@kernel.org>2025-07-18 11:44:54 +0200
commit36caa026b28a49aa91495698350ce46577293e9d (patch)
tree4404c1877b495888322c28ba4a2a43820ce109af /rust/helpers/workqueue.c
parent0864197382fa7c8c2641bff0f36355bf4bd76398 (diff)
drm/sched: Avoid double re-lock on the job free path
Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs, free a single job, and then lock again to decide whether to re-queue itself if there are more finished jobs. Since drm_sched_get_finished_job() already looks at the second job in the queue we can simply add the signaled check and have it return the presence of more jobs to be freed to the caller. That way the work item does not have to lock the list again and repeat the signaled check. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Cc: Christian König <christian.koenig@amd.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: Maíra Canal <mcanal@igalia.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Philipp Stanner <phasta@kernel.org> Reviewed-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://lore.kernel.org/r/20250716085117.56864-1-tvrtko.ursulin@igalia.com
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions