This is a note to let you know that I've just added the patch titled

    drm/sched: Always increment correct scheduler score

to the 6.10-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-sched-always-increment-correct-scheduler-score.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 087913e0ba2b3b9d7ccbafb2acf5dab9e35ae1d5 Mon Sep 17 00:00:00 2001
From: Tvrtko Ursulin <[email protected]>
Date: Tue, 24 Sep 2024 11:19:09 +0100
Subject: drm/sched: Always increment correct scheduler score
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Tvrtko Ursulin <[email protected]>

commit 087913e0ba2b3b9d7ccbafb2acf5dab9e35ae1d5 upstream.

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: d41a39dda140 ("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]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/gpu/drm/scheduler/sched_entity.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/scheduler/sched_entity.c
+++ b/drivers/gpu/drm/scheduler/sched_entity.c
@@ -586,7 +586,6 @@ void drm_sched_entity_push_job(struct dr
        ktime_t submit_ts;
 
        trace_drm_sched_job(sched_job, entity);
-       atomic_inc(entity->rq->sched->score);
        WRITE_ONCE(entity->last_user, current->group_leader);
 
        /*
@@ -614,6 +613,7 @@ void drm_sched_entity_push_job(struct dr
                rq = entity->rq;
                sched = rq->sched;
 
+               atomic_inc(sched->score);
                drm_sched_rq_add_entity(rq, entity);
                spin_unlock(&entity->rq_lock);
 


Patches currently in stable-queue which might be from [email protected] 
are

queue-6.10/drm-sched-always-increment-correct-scheduler-score.patch
queue-6.10/drm-v3d-prevent-out-of-bounds-access-in-performance-query-extensions.patch
queue-6.10/drm-sched-always-wake-up-correct-scheduler-in-drm_sched_entity_push_job.patch
queue-6.10/drm-sched-add-locking-to-drm_sched_entity_modify_sched.patch

Reply via email to