diff mbox

[RFC,07/10] sched: Get rid of scaling usage by cpu_capacity_orig

Message ID 1417529192-11579-8-git-send-email-morten.rasmussen@arm.com (mailing list archive)
State RFC, archived
Headers show

Commit Message

Morten Rasmussen Dec. 2, 2014, 2:06 p.m. UTC
From: Dietmar Eggemann <dietmar.eggemann@arm.com>

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>
---
 kernel/sched/fair.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 5c4c989..090223f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4806,12 +4806,11 @@  static int select_idle_sibling(struct task_struct *p, int target)
 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;
 }
 
 /*