[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJWu+orMR4ATOhdyDm0PpqOgLhr6drnVNA97heafnfKc9g6+7g@mail.gmail.com>
Date: Mon, 10 Jul 2017 00:46:42 -0700
From: Joel Fernandes <joelaf@...gle.com>
To: Juri Lelli <juri.lelli@....com>
Cc: Viresh Kumar <viresh.kumar@...aro.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
LKML <linux-kernel@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vincent Guittot <vincent.guittot@...aro.org>,
Steven Rostedt <rostedt@...dmis.org>,
Luca Abeni <luca.abeni@...tannapisa.it>,
claudio@...dence.eu.com,
Tommaso Cucinotta <tommaso.cucinotta@...tannapisa.it>,
bristot@...hat.com, Mathieu Poirier <mathieu.poirier@...aro.org>,
Todd Kjos <tkjos@...roid.com>,
Andres Oportus <andresoportus@...gle.com>,
Morten Rasmussen <morten.rasmussen@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Patrick Bellasi <patrick.bellasi@....com>,
Ingo Molnar <mingo@...nel.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [RFC PATCH v1 4/8] sched/cpufreq_schedutil: split utilization signals
On Fri, Jul 7, 2017 at 3:59 AM, Juri Lelli <juri.lelli@....com> wrote:
[..]
>
>> If yes, then I don't think it was about having separate APIs, but just storing
>> util_cfs/dl separately.
>>
>> > -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)
>> > - >> BW_SHIFT;
>> >
>> > - *max = arch_scale_cpu_capacity(NULL, smp_processor_id());
>> > + 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)
>> > + >> BW_SHIFT;
>> > +}
>> >
>> > +static unsigned long sugov_aggregate_util(struct sugov_cpu *sg_cpu)
>>
>> As Joel already mentioned, I don't think we should create two separate routines
>> here.
>>
>
> Mmm, it makes retrieving of utilization in sugov_update_shared and
> aggregating values for the domain in sugov_next_freq_shared cleaner,
> IMHO.
>
I agree, thanks.
-Joel
Powered by blists - more mailing lists