Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1649333 > unrolled thread

[PATCH 2/2] cpufreq/schedutil: add rt utilization tracking

Started byVincent Guittot <vincent.guittot@linaro.org>
First post2017-05-24 11:10 +0200
Last post2017-05-24 11:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/2] cpufreq/schedutil: add rt utilization tracking Vincent Guittot <vincent.guittot@linaro.org> - 2017-05-24 11:10 +0200

#1649333 — [PATCH 2/2] cpufreq/schedutil: add rt utilization tracking

FromVincent Guittot <vincent.guittot@linaro.org>
Date2017-05-24 11:10 +0200
Subject[PATCH 2/2] cpufreq/schedutil: add rt utilization tracking
Message-ID<tKAsN-ma-5@gated-at.bofh.it>
Add both cfs_rq and rt_rq's utilization when selecting an OPP for cfs task
as rt task can preempt and steal cfs's running time.
This prevent frequency drops when rt tasks steal running time to cfs tasks
which appear lower than they are.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
 kernel/sched/cpufreq_schedutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 622eed1..bc292b92 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -164,7 +164,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;
 }
 
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web