Patch "sched_ext: switch class when preempted by higher priority scheduler" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    sched_ext: switch class when preempted by higher priority scheduler

to the 6.12-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:
     sched_ext-switch-class-when-preempted-by-higher-prio.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 58e0563c10d0a205b16b906447f6a0b9146ebf08
Author: Honglei Wang <jameshongleiwang@xxxxxxx>
Date:   Wed Jan 8 10:33:28 2025 +0800

    sched_ext: switch class when preempted by higher priority scheduler
    
    [ Upstream commit 68e449d849fd50bd5e61d8bd32b3458dbd3a3df6 ]
    
    ops.cpu_release() function, if defined, must be invoked when preempted by
    a higher priority scheduler class task. This scenario was skipped in
    commit f422316d7466 ("sched_ext: Remove switch_class_scx()"). Let's fix
    it.
    
    Fixes: f422316d7466 ("sched_ext: Remove switch_class_scx()")
    Signed-off-by: Honglei Wang <jameshongleiwang@xxxxxxx>
    Acked-by: Andrea Righi <arighi@xxxxxxxxxx>
    Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 81235942555a..f3ca1a88375c 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -2917,7 +2917,7 @@ static void put_prev_task_scx(struct rq *rq, struct task_struct *p,
 		 */
 		if (p->scx.slice && !scx_rq_bypassing(rq)) {
 			dispatch_enqueue(&rq->scx.local_dsq, p, SCX_ENQ_HEAD);
-			return;
+			goto switch_class;
 		}
 
 		/*
@@ -2934,6 +2934,7 @@ static void put_prev_task_scx(struct rq *rq, struct task_struct *p,
 		}
 	}
 
+switch_class:
 	if (next && next->sched_class != &ext_sched_class)
 		switch_class(rq, next);
 }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux