diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-02-16 16:48:56 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-02-16 16:48:56 +0100 |
commit | 6e40f5bbbc734231bc5809d3eb785e3c21f275d7 (patch) | |
tree | 8520fc84d9643502ebe86233cefcd774e2babf72 /kernel/sched_fair.c | |
parent | kthread, sched: Remove reference to kthread_create_on_cpu (diff) | |
parent | sched: Fix race between ttwu() and task_rq_lock() (diff) | |
download | linux-6e40f5bbbc734231bc5809d3eb785e3c21f275d7.tar.xz linux-6e40f5bbbc734231bc5809d3eb785e3c21f275d7.zip |
Merge branch 'sched/urgent' into sched/core
Conflicts: kernel/sched.c
Necessary due to the urgent fixes which conflict with the code move
from sched.c to sched_fair.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index b45abbe55067..ff7692ccda89 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -2792,12 +2792,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; |