mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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:
|
||
|---|---|---|
| .. | ||
| tests | ||
| .kunitconfig | ||
| gpu_scheduler_trace.h | ||
| Makefile | ||
| sched_entity.c | ||
| sched_fence.c | ||
| sched_internal.h | ||
| sched_main.c | ||
| sched_rq.c | ||