lkml.org 
[lkml]   [2017]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 4/8] sched/cpufreq_schedutil: split utilization signals
Hi,

On 23/05/17 21:04, Peter Zijlstra wrote:
> 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.

Right, will use that.

Thanks,

- Juri

\
 
 \ /
  Last update: 2017-05-24 11:03    [W:0.066 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site