Re: [PATCH v2 2/2] drm/sched: Protect entity->last_scheduled with spinlock

Philipp Stanner <[email protected]>
Newsgroups org.kernel.vger.linux-media,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.