This is a note to let you know that I've just added the patch titled sched/fair: Fix sched_can_stop_tick() for fair tasks 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-fair-fix-sched_can_stop_tick-for-fair-tasks.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 4293c828ce43bf82f65abe9fd85d5138ddb58d99 Author: Vincent Guittot <vincent.guittot@xxxxxxxxxx> Date: Mon Dec 2 18:45:56 2024 +0100 sched/fair: Fix sched_can_stop_tick() for fair tasks [ Upstream commit c1f43c342e1f2e32f0620bf2e972e2a9ea0a1e60 ] We can't stop the tick of a rq if there are at least 2 tasks enqueued in the whole hierarchy and not only at the root cfs rq. rq->cfs.nr_running tracks the number of sched_entity at one level whereas rq->cfs.h_nr_running tracks all queued tasks in the hierarchy. Fixes: 11cc374f4643b ("sched_ext: Simplify scx_can_stop_tick() invocation in sched_can_stop_tick()") Signed-off-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@xxxxxxx> Link: https://lore.kernel.org/r/20241202174606.4074512-2-vincent.guittot@xxxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 6cc12777bb11..d07dc87787df 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1300,7 +1300,7 @@ bool sched_can_stop_tick(struct rq *rq) if (scx_enabled() && !scx_can_stop_tick(rq)) return false; - if (rq->cfs.nr_running > 1) + if (rq->cfs.h_nr_running > 1) return false; /*