lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-18cec7e0ddd5e28b7722f7049d715873373be3e9@git.kernel.org>
Date:   Wed, 10 Jan 2018 04:16:03 -0800
From:   tip-bot for Joel Fernandes <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     jbacik@...com, patrick.bellasi@....com, morten.rasmussen@....com,
        Chris.Redpath@....com, skannan@...cinc.com, joelaf@...gle.com,
        eas-dev@...ts.linaro.org, hpa@...or.com,
        vincent.guittot@...aro.org, tglx@...utronix.de,
        rostedt@...dmis.org, fweisbec@...il.com,
        linux-kernel@...r.kernel.org, srinivas.pandruvada@...ux.intel.com,
        rjw@...ysocki.net, juri.lelli@....com, smuckle@...gle.com,
        atish.patra@...cle.com, markivx@...eaurora.org,
        peterz@...radead.org, mingo@...nel.org, rohit.k.jain@...cle.com,
        dietmar.eggemann@....com, brendan.jackman@....com, lenb@...nel.org,
        viresh.kumar@...aro.org, kernel-team@...roid.com,
        torvalds@...ux-foundation.org
Subject: [tip:sched/core] sched/fair: Remove impossible condition from
 find_idlest_group_cpu()

Commit-ID:  18cec7e0ddd5e28b7722f7049d715873373be3e9
Gitweb:     https://git.kernel.org/tip/18cec7e0ddd5e28b7722f7049d715873373be3e9
Author:     Joel Fernandes <joelaf@...gle.com>
AuthorDate: Fri, 15 Dec 2017 07:39:44 -0800
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 10 Jan 2018 11:30:30 +0100

sched/fair: Remove impossible condition from find_idlest_group_cpu()

find_idlest_group_cpu() goes through CPUs of a group previous selected by
find_idlest_group(). find_idlest_group() returns NULL if the local group is the
selected one and doesn't execute find_idlest_group_cpu if the group to which
'cpu' belongs to is chosen. So we're always guaranteed to call
find_idlest_group_cpu() with a group to which 'cpu' is non-local.

This makes one of the conditions in find_idlest_group_cpu() an impossible one,
which we can get rid off.

Signed-off-by: Joel Fernandes <joelaf@...gle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Brendan Jackman <brendan.jackman@....com>
Reviewed-by: Vincent Guittot <vincent.guittot@...aro.org>
Cc: Android Kernel <kernel-team@...roid.com>
Cc: Atish Patra <atish.patra@...cle.com>
Cc: Chris Redpath <Chris.Redpath@....com>
Cc: Dietmar Eggemann <dietmar.eggemann@....com>
Cc: EAS Dev <eas-dev@...ts.linaro.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Josef Bacik <jbacik@...com>
Cc: Juri Lelli <juri.lelli@....com>
Cc: Len Brown <lenb@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Morten Ramussen <morten.rasmussen@....com>
Cc: Patrick Bellasi <patrick.bellasi@....com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rafael J. Wysocki <rjw@...ysocki.net>
Cc: Rohit Jain <rohit.k.jain@...cle.com>
Cc: Saravana Kannan <skannan@...cinc.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc: Steve Muckle <smuckle@...gle.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Vikram Mulukutla <markivx@...eaurora.org>
Cc: Viresh Kumar <viresh.kumar@...aro.org>
Link: http://lkml.kernel.org/r/20171215153944.220146-3-joelaf@google.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 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 6e775ac..3e7606d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5950,7 +5950,7 @@ find_idlest_group_cpu(struct sched_group *group, struct task_struct *p, int this
 			}
 		} else if (shallowest_idle_cpu == -1) {
 			load = weighted_cpuload(cpu_rq(i));
-			if (load < min_load || (load == min_load && i == this_cpu)) {
+			if (load < min_load) {
 				min_load = load;
 				least_loaded_cpu = i;
 			}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ