[PATCH] sched/fair: Remove dead throttled check in pick_task_fair()
From: fangqiurong
Date: Tue Aug 04 2026 - 21:41:18 EST
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@xxxxxxxxxx>
---
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