Re: [PATCH v2 2/2] drm/sched: Protect entity->last_scheduled with spinlock
From: Philipp Stanner
Date: Thu Aug 13 2026 - 06:17:02 EST
On Thu, 2026-08-13 at 11:25 +0200, Philipp Stanner wrote:
>
> + drm_sched_rq_pop_entity(entity);
> + spin_unlock(&entity->lock);
>
> spsc_queue_pop(&entity->job_queue);
>
> - spin_lock(&entity->lock);
> - drm_sched_rq_pop_entity(entity);
> - spin_unlock(&entity->lock);
> + dma_fence_put(prev_last_scheduled);
The relative order between these must not be changed. My bad.
So unfortunately it looks as if at least locking spsc_queue here is
necessary. I really wished someone could pick up our spsc_queue locking
TODO.
P.