mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vincent Guittot <vincent.guittot@linaro.org>
To: peterz@infradead.org, mingo@kernel.org,
	linux-kernel@vger.kernel.org, rjw@rjwysocki.net
Cc: juri.lelli@arm.com, dietmar.eggemann@arm.com,
	Morten.Rasmussen@arm.com, viresh.kumar@linaro.org,
	Vincent Guittot <vincent.guittot@linaro.org>
Subject: [PATCH 3/3] cpufreq/schedutil: add rt utilization tracking
Date: Wed, 22 Nov 2017 15:35:55 +0100	[thread overview]
Message-ID: <1511361355-10715-4-git-send-email-vincent.guittot@linaro.org> (raw)
In-Reply-To: <1511361355-10715-1-git-send-email-vincent.guittot@linaro.org>

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(-)

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 9209d83..d06a41e 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -183,7 +183,7 @@ static void sugov_get_util(unsigned long *util, unsigned long *max, int cpu)
 
 	cfs_max = arch_scale_cpu_capacity(NULL, cpu);
 
-	*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

      parent reply	other threads:[~2017-11-22 14:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 14:35 [PATCH 0/3 v3] sched/rt: track rt rq utilization Vincent Guittot
2017-11-22 14:35 ` [PATCH v3 1/3] sched/pelt: Move pelt related code in a dedicated file Vincent Guittot
2017-12-11 14:08   ` Quentin Perret
2017-12-12 11:21     ` Vincent Guittot
2017-12-12 12:35       ` Quentin Perret
2017-11-22 14:35 ` [PATCH v3 2/3] sched/rt: add rt_rq utilization tracking Vincent Guittot
2017-11-22 14:35 ` Vincent Guittot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1511361355-10715-4-git-send-email-vincent.guittot@linaro.org \
    --to=vincent.guittot@linaro.org \
    --cc=Morten.Rasmussen@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®