[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171222121015.3otsnoibduurmhio@hirez.programming.kicks-ass.net>
Date: Fri, 22 Dec 2017 13:10:15 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Patrick Bellasi <patrick.bellasi@....com>
Cc: Juri Lelli <juri.lelli@...hat.com>, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Morten Rasmussen <morten.rasmussen@....com>,
Todd Kjos <tkjos@...roid.com>,
Joel Fernandes <joelaf@...gle.com>
Subject: Re: [PATCH v3 0/6] cpufreq: schedutil: fixes for flags updates
On Fri, Dec 22, 2017 at 12:46:18PM +0100, Peter Zijlstra wrote:
> Blergh that'd make a mess of things again.
Something like so then..
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -187,11 +187,16 @@ static void sugov_get_util(struct sugov_
static unsigned long sugov_aggregate_util(struct sugov_cpu *sg_cpu)
{
- unsigned long util = sg_cpu->util_cfs + sg_cpu->util_dl;
struct rq *rq = cpu_rq(sg_cpu->cpu);
+ unsigned long util;
- if (rq->rt.rt_nr_running)
+ if (rq->rt.rt_nr_running) {
util = sg_cpu->max;
+ } else {
+ util = sg_cpu->util_dl;
+ if (rq->cfs.h_nr_running)
+ util += sg_cpu->util_cfs;
+ }
/*
* Ideally we would like to set util_dl as min/guaranteed freq and
Powered by blists - more mailing lists