[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1138228c-f26a-d968-4c92-9ea9c8c85c6f@arm.com>
Date: Mon, 12 Sep 2022 10:46:11 +0200
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>, mingo@...hat.com,
peterz@...radead.org, juri.lelli@...hat.com, rostedt@...dmis.org,
bsegall@...gle.com, mgorman@...e.de, bristot@...hat.com,
vschneid@...hat.com, linux-kernel@...r.kernel.org
Cc: zhangqiao22@...wei.com
Subject: Re: [PATCH 3/4] sched/fair: move call to list_last_entry() in
detach_tasks
On 25/08/2022 14:27, Vincent Guittot wrote:
s/sched/fair: move/sched/fair: Move
s/detach_tasks/detach_tasks()
> Move the call to list_last_entry() in detach_tasks() after testing
> loop_max and loop_break.
>
> Signed-off-by: Vincent Guittot <vincent.guittot@...aro.org>
> ---
> kernel/sched/fair.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 6972a1a29a48..260a55ac462f 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -8047,8 +8047,6 @@ static int detach_tasks(struct lb_env *env)
> if (env->idle != CPU_NOT_IDLE && env->src_rq->nr_running <= 1)
> break;
>
> - p = list_last_entry(tasks, struct task_struct, se.group_node);
> -
> env->loop++;
> /*
> * We've more or less seen every task there is, call it quits
> @@ -8065,6 +8063,8 @@ static int detach_tasks(struct lb_env *env)
> break;
> }
>
> + p = list_last_entry(tasks, struct task_struct, se.group_node);
> +
> if (!can_migrate_task(p, env))
> goto next;
>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@....com>
Powered by blists - more mailing lists