scheduler fix
Linus,
Please pull the latest sched/urgent Git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-urgent-2025-11-08
# HEAD: 956dfda6a70885f18c0f8236a461aa2bc4f556ad sched/fair: Prevent cfs_rq from being unthrottled with zero runtime_remaining
Fix a group-throttling bug in the fair scheduler.
Thanks,
Ingo
------------------>
Aaron Lu (1):
sched/fair: Prevent cfs_rq from being unthrottled with zero runtime_remaining
kernel/sched/core.c | 2 +- kernel/sched/fair.c | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-)
kernel/sched/core.c +1 -1
@@ -9606,7 +9606,7 @@ static int tg_set_cfs_bandwidth(struct task_group *tg,guard (rq_lock_irq)(rq); cfs_rq->runtime_enabled = runtime_enabled; - cfs_rq->runtime_remaining =0 ; + cfs_rq->runtime_remaining =1 ;if (cfs_rq->throttled)unthrottle_cfs_rq (cfs_rq);
kernel/sched/fair.c +6 -9
@@ -6024,20 +6024,17 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq)struct sched_entity *se = cfs_rq->tg->se[cpu_of (rq)];/* -* It's possible we are called with !runtime_remaining due to things -* like user changed quota setting(see tg_set_cfs_bandwidth()) or async -* unthrottled us with a positive runtime_remaining but other still -* running entities consumed those runtime before we reached here. +* It's possible we are called with runtime_remaining < 0 due to things +* like async unthrottled us with a positive runtime_remaining but other +* still running entities consumed those runtime before we reached here. * -* Anyway, we can't unthrottle this cfs_rq without any runtime remaining -* because any enqueue in tg_unthrottle_up() will immediately trigger a -* throttle, which is not supposed to happen on unthrottle path. +* We can't unthrottle this cfs_rq without any runtime remaining because +* any enqueue in tg_unthrottle_up() will immediately trigger a throttle, +* which is not supposed to happen on unthrottle path. */ if (cfs_rq->runtime_enabled && cfs_rq->runtime_remaining <=0 )return ; - se = cfs_rq->tg->se[cpu_of (rq)]; - cfs_rq->throttled =0 ;update_rq_clock (rq);
The pull request you sent on Sat, 8 Nov 2025 14:12:17 +0100:
The pull request you sent on Sat, 8 Nov 2025 14:12:17 +0100:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gitsched-urgent-2025-11-08
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/b5c0946029200d93f1239d3f310efa3f075abf79
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html