kernel/sched/fair.c | 5 ----- 1 file changed, 5 deletions(-)
commit f666241e6bd5 ("sched/fair: Unify cfs_rq throttling via
account_cfs_rq_runtime()") removed the only assignment to @throttled in
the pick_task_fair() walk loop, making the variable and the trailing
task_throttle_setup_work() call dead code. Drop them.
No functional change.
Assisted-by: Z.ai:glm-5.2
Signed-off-by: fangqiurong <fangqiurong@kylinos.cn>
---
kernel/sched/fair.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index bee6050a8f3a..967986212b43 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9941,7 +9941,6 @@ struct task_struct *pick_task_fair(struct rq *rq, struct rq_flags *rf)
struct sched_entity *se;
struct cfs_rq *cfs_rq;
struct task_struct *p;
- bool throttled;
int new_tasks;
again:
@@ -9949,8 +9948,6 @@ struct task_struct *pick_task_fair(struct rq *rq, struct rq_flags *rf)
if (!cfs_rq->nr_queued)
goto idle;
- throttled = false;
-
do {
/* Might not have done put_prev_entity() */
if (cfs_rq->curr && cfs_rq->curr->on_rq)
@@ -9963,8 +9960,6 @@ struct task_struct *pick_task_fair(struct rq *rq, struct rq_flags *rf)
} while (cfs_rq);
p = task_of(se);
- if (unlikely(throttled))
- task_throttle_setup_work(p);
return p;
idle:
--
2.43.0
On 8/5/2026 7:09 AM, fangqiurong wrote:
> commit f666241e6bd5 ("sched/fair: Unify cfs_rq throttling via
> account_cfs_rq_runtime()") removed the only assignment to @throttled in
> the pick_task_fair() walk loop, making the variable and the trailing
> task_throttle_setup_work() call dead code. Drop them.
Thank you for catching my oversight. Looking at tip:sched/core,
Peter has already cleaned this up as a part of commit 85570f10a4c6
("sched/eevdf: Move to a single runqueue")
--
Thanks and Regards,
Prateek
© 2016 - 2026 Red Hat, Inc.