* [PATCH resend] sched:check if got a shallowest_idle_cpu before search for least_loaded_cpu
@ 2014-10-28 4:08 Yao Dongdong
2014-11-04 16:10 ` [tip:sched/core] sched: Check if we got a shallowest_idle_cpu before searching " tip-bot for Yao Dongdong
0 siblings, 1 reply; 2+ messages in thread
From: Yao Dongdong @ 2014-10-28 4:08 UTC (permalink / raw)
To: peterz, mingo; +Cc: linux-kernel, srikar, yaodongdong
Idle cpu is idler than non-idle cpu, so we needn't search for least_loaded_cpu
after we have found an idle cpu.
Signed-off-by: Yao Dongdong <yaodongdong@huawei.com>
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.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 0b069bf..2445a23 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4446,7 +4446,7 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
latest_idle_timestamp = rq->idle_stamp;
shallowest_idle_cpu = i;
}
- } else {
+ } else if (shallowest_idle_cpu == -1) {
load = weighted_cpuload(i);
if (load < min_load || (load == min_load && i == this_cpu)) {
min_load = load;
--
1.8.3.4
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip:sched/core] sched: Check if we got a shallowest_idle_cpu before searching for least_loaded_cpu
2014-10-28 4:08 [PATCH resend] sched:check if got a shallowest_idle_cpu before search for least_loaded_cpu Yao Dongdong
@ 2014-11-04 16:10 ` tip-bot for Yao Dongdong
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Yao Dongdong @ 2014-11-04 16:10 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, hpa, torvalds, mingo, peterz, yaodongdong, srikar, linux-kernel
Commit-ID: 9f96742a13135e6c609cc99a3a458402af3c8f31
Gitweb: http://git.kernel.org/tip/9f96742a13135e6c609cc99a3a458402af3c8f31
Author: Yao Dongdong <yaodongdong@huawei.com>
AuthorDate: Tue, 28 Oct 2014 04:08:06 +0000
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 4 Nov 2014 07:17:51 +0100
sched: Check if we got a shallowest_idle_cpu before searching for least_loaded_cpu
Idle cpu is idler than non-idle cpu, so we needn't search for least_loaded_cpu
after we have found an idle cpu.
Signed-off-by: Yao Dongdong <yaodongdong@huawei.com>
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1414469286-6023-1-git-send-email-yaodongdong@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.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 ec32c26d..d03d76d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4641,7 +4641,7 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
latest_idle_timestamp = rq->idle_stamp;
shallowest_idle_cpu = i;
}
- } else {
+ } else if (shallowest_idle_cpu == -1) {
load = weighted_cpuload(i);
if (load < min_load || (load == min_load && i == this_cpu)) {
min_load = load;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-04 16:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-28 4:08 [PATCH resend] sched:check if got a shallowest_idle_cpu before search for least_loaded_cpu Yao Dongdong
2014-11-04 16:10 ` [tip:sched/core] sched: Check if we got a shallowest_idle_cpu before searching " tip-bot for Yao Dongdong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®