On Tue, 2026-09-15 at 16:05 +0100, Tvrtko Ursulin wrote:
> Prevent pushing a new job to an entity seeing it being the first in the
> queue, and hence entering the drm_sched_rq_add_entity() path, if the pop
> side in drm_sched_entity_pop_job() has just de-queued the job but not yet
> updated the saved virtual time.
> 
> Restoring the unsaved virtual time, which is at this point not a delta but
> still an absolute value, pushes the said entity to the rear of the run queue
> for a potentially very long time.
> 
> We close this race by pulling the locked sections out to encompass both
> the queue push/pop and corresponding rbtree management.
> 
> This is aligned with the future direction to replace the current lockless
> job queue with one of the fully locked standard list primitives.
> 
> Signed-off-by: Tvrtko Ursulin <[email protected]>
> Fixes: 2fa4d8e2c109 ("drm/sched: Add fair scheduling policy")
> Suggested-by: [email protected] # via Claude Opus
> Tested-by: [email protected]

Shoved it to misc-fixes, thx guys

P.

Reply via email to