aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>2026-09-15 16:05:57 +0100
committerPhilipp Stanner <phasta@kernel.org>2026-09-16 09:17:51 +0200
commit2ab510e63197360945f915dd5631a77c63ac6b27 (patch)
treef51cf7cd5a2820e023678103d521697ee0898ce1 /include/linux
parent3ed11c671ff7ec58c8fd96410233c677df23f407 (diff)
drm/sched: Fix virtual runtime race
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 <tvrtko.ursulin@igalia.com> Fixes: 2fa4d8e2c109 ("drm/sched: Add fair scheduling policy") Suggested-by: Luke.Wildhardt@proton.me # via Claude Opus Tested-by: Luke.Wildhardt@proton.me Cc: Christian König <christian.koenig@amd.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: Philipp Stanner <phasta@kernel.org> Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Vitaly Prosyak <vitaly.prosyak@amd.com> Cc: stable@vger.kernel.org # v7.2+ [phasta: commit title] Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patch.msgid.link/20260915150557.62847-1-tvrtko.ursulin@igalia.com
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions