mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
sched/fair: Correct unit of load_above_capacity
In calculate_imbalance() load_above_capacity currently has the unit [capacity] while it is used as being [load/capacity]. Not only is it wrong it also makes it unlikely that load_above_capacity is ever used as the subsequent code picks the smaller of load_above_capacity and the avg_load This patch ensures that load_above_capacity has the right unit [load/capacity]. Signed-off-by: Morten Rasmussen <[email protected]> [ Changed changelog to note it was in capacity unit; +rebase. ] Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Dietmar Eggemann <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
1be0eb2a97
commit
cfa1033431
1 changed files with 4 additions and 2 deletions
|
|
@ -7067,9 +7067,11 @@ 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 * SCHED_CAPACITY_SCALE;
|
||||
if (load_above_capacity > busiest->group_capacity)
|
||||
if (load_above_capacity > busiest->group_capacity) {
|
||||
load_above_capacity -= busiest->group_capacity;
|
||||
else
|
||||
load_above_capacity *= NICE_0_LOAD;
|
||||
load_above_capacity /= busiest->group_capacity;
|
||||
} else
|
||||
load_above_capacity = ~0UL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue