diff mbox series

[RESEND,v2,2/2] cpufreq/schedutil: add rt utilization tracking

Message ID 1501854022-22128-3-git-send-email-vincent.guittot@linaro.org
State Superseded
Headers show
Series sched/rt: track rt rq utilization | expand

Commit Message

Vincent Guittot Aug. 4, 2017, 1:40 p.m. UTC
Add both cfs and rt utilization when selecting an OPP as rt can preempt and
steal cfs's running time.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>


---
 kernel/sched/cpufreq_schedutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4
diff mbox series

Patch

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 076a2e3..04fabea 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -161,7 +161,7 @@  static void sugov_get_util(unsigned long *util, unsigned long *max)
 
 	cfs_max = arch_scale_cpu_capacity(NULL, smp_processor_id());
 
-	*util = min(rq->cfs.avg.util_avg, cfs_max);
+	*util = min(rq->cfs.avg.util_avg + rq->rt.avg.util_avg, cfs_max);
 	*max = cfs_max;
 }