[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <06444675-136e-442f-918b-e7887d2c535b@wanadoo.fr>
Date: Thu, 5 Dec 2024 22:23:17 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: John Stultz <jstultz@...gle.com>, LKML <linux-kernel@...r.kernel.org>
Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
Wanpeng Li <wanpeng.li@...ux.intel.com>, Todd Kjos <tkjos@...gle.com>,
kernel-team@...roid.com
Subject: Re: [RFC][PATCH] sched: deadline: Remove unnecessary goto label in
pick_earliest_pushable_dl_task
Le 05/12/2024 à 22:16, John Stultz a écrit :
> Commit 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()")
> added an odd goto label that seems to be unnecssary, given its
s/unnecssary/unnecessary/
> called unconditionally from the bottom of a while loop and the
> label is at the top.
Except that it is not a while loop, but only an if.
Maybe, changing this if into a while would save a few lines of code and
be more readable as-well.
CJ
>
> Thus, clean it up and remove the label/goto.
>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Juri Lelli <juri.lelli@...hat.com>
> Cc: Vincent Guittot <vincent.guittot@...aro.org>
> Cc: Dietmar Eggemann <dietmar.eggemann@....com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Ben Segall <bsegall@...gle.com>
> Cc: Mel Gorman <mgorman@...e.de>
> Cc: Valentin Schneider <vschneid@...hat.com>
> Cc: Wanpeng Li <wanpeng.li@...ux.intel.com>
> Cc: Todd Kjos <tkjos@...gle.com>
> Cc: kernel-team@...roid.com
> Fixes: 8b5e770ed7c0 ("sched/deadline: Optimize pull_dl_task()")
> Reported-by: Todd Kjos <tkjos@...gle.com>
> Signed-off-by: John Stultz <jstultz@...gle.com>
> ---
> 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;
Powered by blists - more mailing lists