* [PATCH] sched/fair: Remove dead throttled check in pick_task_fair()
@ 2026-08-05 1:39 fangqiurong
2026-08-05 9:12 ` K Prateek Nayak
0 siblings, 1 reply; 2+ messages in thread
From: fangqiurong @ 2026-08-05 1:39 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra
Cc: Juri Lelli, Vincent Guittot, Dietmar Eggemann, Steven Rostedt,
Ben Segall, Mel Gorman, Valentin Schneider, K Prateek Nayak,
linux-kernel, fangqiurong
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sched/fair: Remove dead throttled check in pick_task_fair()
2026-08-05 1:39 [PATCH] sched/fair: Remove dead throttled check in pick_task_fair() fangqiurong
@ 2026-08-05 9:12 ` K Prateek Nayak
0 siblings, 0 replies; 2+ messages in thread
From: K Prateek Nayak @ 2026-08-05 9:12 UTC (permalink / raw)
To: fangqiurong, Ingo Molnar, Peter Zijlstra
Cc: Juri Lelli, Vincent Guittot, Dietmar Eggemann, Steven Rostedt,
Ben Segall, Mel Gorman, Valentin Schneider, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-05 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-05 1:39 [PATCH] sched/fair: Remove dead throttled check in pick_task_fair() fangqiurong
2026-08-05 9:12 ` K Prateek Nayak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®