summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2016-05-06 12:21:23 +0200
committerIngo Molnar <mingo@kernel.org>2016-05-12 09:55:33 +0200
commit1be0eb2a97d756fb7dd8c9baf372d81fa9699c09 (patch)
tree1031c2ea02335ca83616934ce9fb5d37472e55d4 /kernel/sched
parent444969223c81c7d0a95136b7b4cfdcfbc96ac5bd (diff)
downloadop-kernel-dev-1be0eb2a97d756fb7dd8c9baf372d81fa9699c09.zip
op-kernel-dev-1be0eb2a97d756fb7dd8c9baf372d81fa9699c09.tar.gz
sched/fair: Clean up scale confusion
Wanpeng noted that the scale_load_down() in calculate_imbalance() was weird. I agree, it should be SCHED_CAPACITY_SCALE, since we're going to compare against busiest->group_capacity, which is in [capacity] units. Reported-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Morten Rasmussen <morten.rasmussen@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Yuyang Du <yuyang.du@intel.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/fair.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d28d89d..2338105 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7066,8 +7066,7 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
*/
if (busiest->group_type == group_overloaded &&
local->group_type == group_overloaded) {
- load_above_capacity = busiest->sum_nr_running *
- scale_load_down(NICE_0_LOAD);
+ load_above_capacity = busiest->sum_nr_running * SCHED_CAPACITY_SCALE;
if (load_above_capacity > busiest->group_capacity)
load_above_capacity -= busiest->group_capacity;
else
OpenPOWER on IntegriCloud