[PATCH] sched/fair: Remove dead throttled check in pick_task_fair()

fangqiurong <[email protected]>
Newsgroups org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.