Skip to content

Commit 087913e

Browse files
Tvrtko UrsulinChristianKoenigAMD
authored andcommitted
drm/sched: Always increment correct scheduler score
Entities run queue can change during drm_sched_entity_push_job() so make sure to update the score consistently. Signed-off-by: Tvrtko Ursulin <[email protected]> Fixes: d41a39d ("drm/scheduler: improve job distribution with multiple queues") Cc: Nirmoy Das <[email protected]> Cc: Christian König <[email protected]> Cc: Luben Tuikov <[email protected]> Cc: Matthew Brost <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: [email protected] Cc: <[email protected]> # v5.9+ Reviewed-by: Christian König <[email protected]> Reviewed-by: Nirmoy Das <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
1 parent cbc8764 commit 087913e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/scheduler/sched_entity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,6 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job)
586586
ktime_t submit_ts;
587587

588588
trace_drm_sched_job(sched_job, entity);
589-
atomic_inc(entity->rq->sched->score);
590589
WRITE_ONCE(entity->last_user, current->group_leader);
591590

592591
/*
@@ -614,6 +613,7 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job)
614613
rq = entity->rq;
615614
sched = rq->sched;
616615

616+
atomic_inc(sched->score);
617617
drm_sched_rq_add_entity(rq, entity);
618618
spin_unlock(&entity->rq_lock);
619619

0 commit comments

Comments
 (0)