From d64e71511655caa14b8db9bfbf90984c73241000 Mon Sep 17 00:00:00 2001 From: Suresh Siddha Date: Fri, 12 Feb 2010 17:14:22 -0800 Subject: [PATCH] --- yaml --- r: 182494 b: refs/heads/master c: 9000f05c6d1607f79c0deacf42b09693be673f4c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/sched.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a444621365a9..6b87ae4a3d00 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 28f5318167adf23b16c844b9c2253f355cb21796 +refs/heads/master: 9000f05c6d1607f79c0deacf42b09693be673f4c diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index e3199df426e3..4d78aef4559d 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -4119,12 +4119,23 @@ find_busiest_queue(struct sched_group *group, enum cpu_idle_type idle, continue; rq = cpu_rq(i); - wl = weighted_cpuload(i) * SCHED_LOAD_SCALE; - wl /= power; + wl = weighted_cpuload(i); + /* + * When comparing with imbalance, use weighted_cpuload() + * which is not scaled with the cpu power. + */ if (capacity && rq->nr_running == 1 && wl > imbalance) continue; + /* + * For the load comparisons with the other cpu's, consider + * the weighted_cpuload() scaled with the cpu power, so that + * the load can be moved away from the cpu that is potentially + * running at a lower capacity. + */ + wl = (wl * SCHED_LOAD_SCALE) / power; + if (wl > max_load) { max_load = wl; busiest = rq;