Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1386916
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 3/4] intel_pstate: support scheduler cpufreq callbacks on remote CPUs |
| Date | 2016-04-25 23:40 +0200 |
| Message-ID | <rrWox-4fh-3@gated-at.bofh.it> (permalink) |
| References | <rpQdz-yF-1@gated-at.bofh.it> <rpQdz-yF-7@gated-at.bofh.it> <rpZAe-7Uv-11@gated-at.bofh.it> <rqcxr-1vg-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Apr 21, 2016 at 4:20 AM, Steve Muckle <steve.muckle@linaro.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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 1/4] cpufreq: governor: support scheduler cpufreq callbacks on remote CPUs Steve Muckle <steve.muckle@linaro.org> - 2016-04-20 04:40 +0200
[RFC PATCH 3/4] intel_pstate: support scheduler cpufreq callbacks on remote CPUs Steve Muckle <steve.muckle@linaro.org> - 2016-04-20 04:40 +0200
Re: [RFC PATCH 3/4] intel_pstate: support scheduler cpufreq callbacks on remote CPUs "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-04-20 14:40 +0200
Re: [RFC PATCH 3/4] intel_pstate: support scheduler cpufreq callbacks on remote CPUs Steve Muckle <steve.muckle@linaro.org> - 2016-04-21 04:30 +0200
Re: [RFC PATCH 3/4] intel_pstate: support scheduler cpufreq callbacks on remote CPUs "Rafael J. Wysocki" <rafael@kernel.org> - 2016-04-25 23:40 +0200
[RFC PATCH 2/4] cpufreq: schedutil: support scheduler cpufreq callbacks on remote CPUs Steve Muckle <steve.muckle@linaro.org> - 2016-04-20 04:40 +0200
[RFC PATCH 4/4] sched/fair: call cpufreq hook for remote wakeups Steve Muckle <steve.muckle@linaro.org> - 2016-04-20 04:50 +0200
Re: [RFC PATCH 1/4] cpufreq: governor: support scheduler cpufreq callbacks on remote CPUs "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-04-20 14:30 +0200
Re: [RFC PATCH 1/4] cpufreq: governor: support scheduler cpufreq callbacks on remote CPUs Steve Muckle <steve.muckle@linaro.org> - 2016-04-25 21:20 +0200
Re: [RFC PATCH 1/4] cpufreq: governor: support scheduler cpufreq callbacks on remote CPUs "Rafael J. Wysocki" <rafael@kernel.org> - 2016-04-25 23:30 +0200
csiph-web