[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <163220927280.25758.10968958544939883057.tip-bot2@tip-bot2>
Date: Tue, 21 Sep 2021 07:27:52 -0000
From: "tip-bot2 for Ricardo Neri" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
"Joel Fernandes (Google)" <joel@...lfernandes.org>,
Len Brown <len.brown@...el.com>,
Vincent Guittot <vincent.guittot@...aro.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched/fair: Optimize checking for group_asym_packing
The following commit has been merged into the sched/core branch of tip:
Commit-ID: cb0e4ee938b1a08507ded179cec3a35b4a8d75b8
Gitweb: https://git.kernel.org/tip/cb0e4ee938b1a08507ded179cec3a35b4a8d75b8
Author: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
AuthorDate: Fri, 10 Sep 2021 18:18:16 -07:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Sat, 18 Sep 2021 12:18:39 +02:00
sched/fair: Optimize checking for group_asym_packing
sched_asmy_prefer() always returns false when called on the local group. By
checking local_group, we can avoid additional checks and invoking
sched_asmy_prefer() when it is not needed. No functional changes are
introduced.
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Joel Fernandes (Google) <joel@...lfernandes.org>
Reviewed-by: Len Brown <len.brown@...el.com>
Reviewed-by: Vincent Guittot <vincent.guittot@...aro.org>
Link: https://lkml.kernel.org/r/20210911011819.12184-4-ricardo.neri-calderon@linux.intel.com
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e26d622..d85c5a4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8598,7 +8598,7 @@ static inline void update_sg_lb_stats(struct lb_env *env,
}
/* Check if dst CPU is idle and preferred to this group */
- if (env->sd->flags & SD_ASYM_PACKING &&
+ if (!local_group && env->sd->flags & SD_ASYM_PACKING &&
env->idle != CPU_NOT_IDLE &&
sgs->sum_h_nr_running &&
sched_asym_prefer(env->dst_cpu, group->asym_prefer_cpu)) {
Powered by blists - more mailing lists