On 7/11/25 9:08 PM, Maíra Canal wrote:
Hi Tvrtko,

On 11/07/25 12:09, Tvrtko Ursulin wrote:
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.ursu...@igalia.com>
Cc: Christian König <christian.koe...@amd.com>
Cc: Danilo Krummrich <d...@kernel.org>
Cc: Matthew Brost <matthew.br...@intel.com>
Cc: Philipp Stanner <pha...@kernel.org>
---
v2:
  * Improve commit text and kerneldoc. (Philipp)
  * Rename run free work helper. (Philipp)

Maybe, would it be possible not to rename it? Otherwise, I won't be able
to use the function name `drm_sched_run_free_queue()` in the
DRM_GPU_SCHED_STAT_NO_HANG series.

Not a big deal, but it would ease reintroducing
`drm_sched_run_free_queue()` if the series lands after this patch.

Do you intend to land your series through a different tree?

Reply via email to