[RFC][PATCH] sched: deadline: Remove unnecessary goto label in pick_earliest_pushable_dl_task

From: John Stultz
Date: Thu Dec 05 2024 - 16:16:43 EST


Commit 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()")
added an odd goto label that seems to be unnecssary, given its
called unconditionally from the bottom of a while loop and the
label is at the top.

Thus, clean it up and remove the label/goto.

Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Juri Lelli <juri.lelli@xxxxxxxxxx>
Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Cc: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Ben Segall <bsegall@xxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: Valentin Schneider <vschneid@xxxxxxxxxx>
Cc: Wanpeng Li <wanpeng.li@xxxxxxxxxxxxxxx>
Cc: Todd Kjos <tkjos@xxxxxxxxxx>
Cc: kernel-team@xxxxxxxxxxx
Fixes: 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()")
Reported-by: Todd Kjos <tkjos@xxxxxxxxxx>
Signed-off-by: John Stultz <jstultz@xxxxxxxxxx>
---
kernel/sched/deadline.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index d9d5a702f1a61..566a05efa4e57 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -2501,8 +2501,6 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu
return NULL;

next_node = rb_first_cached(&rq->dl.pushable_dl_tasks_root);
-
-next_node:
if (next_node) {
p = __node_2_pdl(next_node);

@@ -2510,7 +2508,6 @@ static struct task_struct *pick_earliest_pushable_dl_task(struct rq *rq, int cpu
return p;

next_node = rb_next(next_node);
- goto next_node;
}

return NULL;
--
2.47.0.338.g60cca15819-goog