[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hPK+gfZPRTiQTXJOaC02V6r38W6O+AN+mhBmKE8Ut0Gw@mail.gmail.com>
Date: Mon, 25 Apr 2016 23:34:51 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Steve Muckle <steve.muckle@...aro.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Morten Rasmussen <morten.rasmussen@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Juri Lelli <Juri.Lelli@....com>,
Patrick Bellasi <patrick.bellasi@....com>,
Michael Turquette <mturquette@...libre.com>
Subject: Re: [RFC PATCH 3/4] intel_pstate: support scheduler cpufreq callbacks
on remote CPUs
On Thu, Apr 21, 2016 at 4:20 AM, Steve Muckle <steve.muckle@...aro.org> wrote:
> On Wed, Apr 20, 2016 at 02:37:18PM +0200, Rafael J. Wysocki wrote:
> ...
>> > @@ -1173,20 +1179,88 @@ static inline void intel_pstate_adjust_busy_pstate(struct cpudata *cpu)
>> > get_avg_frequency(cpu));
>> > }
>> >
>> > +static void _intel_pstate_update_util(struct cpudata *cpu, u64 time)
>>
>> What about calling this intel_pstate_update_cpu()?
>
> Sure will change.
>
> ...
>> > static void intel_pstate_update_util(struct update_util_data *data, u64 time,
>> > unsigned long util, unsigned long max)
>> > {
>> > struct cpudata *cpu = container_of(data, struct cpudata, update_util);
>> > - u64 delta_ns = time - cpu->sample.time;
>> > + s64 delta_ns = time - cpu->sample.time;
>> >
>> > - if ((s64)delta_ns >= pid_params.sample_rate_ns) {
>> > - bool sample_taken = intel_pstate_sample(cpu, time);
>> > + if (delta_ns < pid_params.sample_rate_ns)
>>
>> Why don't you check cpu->ipi_in_progress here too and bail out if it is set?
>>
>> That would allow you to avoid checking the time again below, woulnd't it?
>
> Yeah I think that should work. I can't recall why I thought I needed
> to check the time first, then ipi_in_progress, then the time. As long
> as ipi_in_progress is checked prior to the time, it should be fine.
I actually think that we can just skip all cross-CPU updates in
intel_pstate instead of adding complexity to it.
The governor algorithm here uses feedback registers to estimate
utilization and I don't think it will react to the corss-CPU updates
the way you want plus it is likely to skip them anyway due to the rate
limit.
Powered by blists - more mailing lists