aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDietmar Eggemann <dietmar.eggemann@arm.com>2014-11-25 20:52:28 +0000
committerRobin Randhawa <robin.randhawa@arm.com>2015-04-09 12:26:12 +0100
commit9f52367cc383e155c9ae4d4776ee1fc4a321a23a (patch)
tree23eb5986e1a5aa4628745a225dada157655d26b5
parent2c58b6ac7774436ccbd350109155ffa011253867 (diff)
downloadkernel-9f52367cc383e155c9ae4d4776ee1fc4a321a23a.tar.gz
sched: Get rid of scaling usage by cpu_capacity_orig
Since now we have besides frequency invariant also cpu (uarch plus max system frequency) invariant cfs_rq::utilization_load_avg both, frequency and cpu scaling happens as part of the load tracking. So cfs_rq::utilization_load_avg does not have to be scaled by the original capacity of the cpu again. Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
-rw-r--r--kernel/sched/fair.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1d4e224..05e5562 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4517,12 +4517,11 @@ done:
static int get_cpu_usage(int cpu)
{
unsigned long usage = cpu_rq(cpu)->cfs.utilization_load_avg;
- unsigned long capacity = capacity_orig_of(cpu);
if (usage >= SCHED_LOAD_SCALE)
- return capacity;
+ return capacity_orig_of(cpu);
- return (usage * capacity) >> SCHED_LOAD_SHIFT;
+ return usage;
}
/*