[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170523190451.3flxegqt7ttmorw6@hirez.programming.kicks-ass.net>
Date: Tue, 23 May 2017 21:04:51 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Juri Lelli <juri.lelli@....com>
Cc: mingo@...hat.com, rjw@...ysocki.net, viresh.kumar@...aro.org,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
tglx@...utronix.de, vincent.guittot@...aro.org,
rostedt@...dmis.org, luca.abeni@...tannapisa.it,
claudio@...dence.eu.com, tommaso.cucinotta@...tannapisa.it,
bristot@...hat.com, mathieu.poirier@...aro.org, tkjos@...roid.com,
joelaf@...gle.com, andresoportus@...gle.com,
morten.rasmussen@....com, dietmar.eggemann@....com,
patrick.bellasi@....com, Ingo Molnar <mingo@...nel.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [PATCH RFC 4/8] sched/cpufreq_schedutil: split utilization
signals
On Tue, May 23, 2017 at 09:53:47AM +0100, Juri Lelli wrote:
> @@ -157,14 +158,13 @@ static unsigned int get_next_freq(struct sugov_policy *sg_policy,
> return cpufreq_driver_resolve_freq(policy, freq);
> }
>
> -static void sugov_get_util(unsigned long *util, unsigned long *max)
> +static void sugov_get_util(struct sugov_cpu *sg_cpu)
> {
> struct rq *rq = this_rq();
> - unsigned long dl_util = (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> 20;
>
> - *max = arch_scale_cpu_capacity(NULL, smp_processor_id());
> -
> - *util = min(rq->cfs.avg.util_avg + dl_util, *max);
> + sg_cpu->max = arch_scale_cpu_capacity(NULL, smp_processor_id());
> + sg_cpu->util_cfs = rq->cfs.avg.util_avg;
> + sg_cpu->util_dl = (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> 20;
> }
Luca just introduced a nice BW_SHIFT for that '20' thing.
Powered by blists - more mailing lists