[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <166325184995.401.17589955355834278252.tip-bot2@tip-bot2>
Date: Thu, 15 Sep 2022 14:24:09 -0000
From: "tip-bot2 for Vincent Guittot" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Vincent Guittot <vincent.guittot@...aro.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched/fair: Move call to list_last_entry() in detach_tasks
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 7e9518baed4cef76dbfa07cbffbae1e6dbc87be6
Gitweb: https://git.kernel.org/tip/7e9518baed4cef76dbfa07cbffbae1e6dbc87be6
Author: Vincent Guittot <vincent.guittot@...aro.org>
AuthorDate: Thu, 25 Aug 2022 14:27:25 +02:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Thu, 15 Sep 2022 16:13:52 +02:00
sched/fair: Move call to list_last_entry() in 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>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Link: https://lkml.kernel.org/r/20220825122726.20819-4-vincent.guittot@linaro.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 7b3a58f..5ffec43 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8044,8 +8044,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
@@ -8062,6 +8060,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;
Powered by blists - more mailing lists