summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2015-04-09 12:04:05 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:02:00 -0700
commit8d4dce6c804e760fb9c3ff1e937dfe63d59af40c (patch)
treeb523fc0712e1f89163eb70ec3ae6af605a6cdcc7 /kernel
parentc17d7d3c4033e4ccb1022930d88e655230dbc79b (diff)
sched: don't inflate the task load when the CPU max freq is restricted
When the CPU max freq is restricted and the CPU is running at the max freq, the task load is inflated by max_possible_freq/max_freq factor. This results in tasks migrating early to the better capacity CPUs which makes things worse if the frequency restriction is due to the thermal condition. Change-Id: Ie0ea405d7005764a6fb852914e88cf97102c138a Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index e877e761fac5..2baf7e319942 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1284,9 +1284,7 @@ static inline u64 scale_exec_time(u64 delta, struct rq *rq)
unsigned int cur_freq = rq->cur_freq;
int sf;
- if (unlikely(cur_freq > max_possible_freq ||
- (cur_freq == rq->max_freq &&
- rq->max_freq < rq->max_possible_freq)))
+ if (unlikely(cur_freq > max_possible_freq))
cur_freq = rq->max_possible_freq;
/* round up div64 */