Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1343114
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context |
| Date | 2016-02-25 12:20 +0100 |
| Message-ID | <r627D-2Zd-7@gated-at.bofh.it> (permalink) |
| References | <r4Lsd-4Yv-3@gated-at.bofh.it> <r605Q-1As-5@gated-at.bofh.it> <r60fw-1DX-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thursday, February 25, 2016 10:12:49 AM Peter Zijlstra wrote:
> On Thu, Feb 25, 2016 at 10:08:40AM +0100, Peter Zijlstra wrote:
> > On Thu, Feb 25, 2016 at 12:30:43AM +0100, Rafael J. Wysocki wrote:
> > > +unsigned int acpi_cpufreq_fast_switch(struct cpufreq_policy *policy,
> > > + unsigned int target_freq)
> > > +{
> > > + struct acpi_cpufreq_data *data = policy->driver_data;
> > > + struct cpufreq_frequency_table *entry;
> > > + struct acpi_processor_performance *perf;
> > > + unsigned int uninitialized_var(next_perf_state);
> > > + unsigned int uninitialized_var(next_freq);
> > > + unsigned int best_diff;
> > > +
> > > + for (entry = data->freq_table, best_diff = UINT_MAX;
> > > + entry->frequency != CPUFREQ_TABLE_END; entry++) {
> > > + unsigned int diff, freq = entry->frequency;
> > > +
> > > + if (freq == CPUFREQ_ENTRY_INVALID)
> > > + continue;
> > > +
> > > + diff = abs(freq - target_freq);
> >
> > Why would you consider frequencies that are below where you want to be?
>
> Also, if you look for the first largest freq (which would make most
> sense I think) and this table is sorted, you can do a binary search.
>
> Then again, not sure the table is big enough to make that worth it.
Yeah, that was my thought too.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC/RFT][PATCH v2 0/2] cpufreq: New governor based on scheduler-provided utilization data "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-24 02:30 +0100
[RFC/RFT][PATCH v2 1/2] cpufreq: New governor using utilization data from the scheduler "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-24 02:30 +0100
[RFC/RFT][PATCH v4 1/2] cpufreq: New governor using utilization data from the scheduler "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-25 22:20 +0100
Re: [RFC/RFT][PATCH v4 1/2] cpufreq: New governor using utilization data from the scheduler "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-27 01:30 +0100
Re: [RFC/RFT][PATCH v4 1/2] cpufreq: New governor using utilization data from the scheduler Steve Muckle <steve.muckle@linaro.org> - 2016-02-27 05:40 +0100
Re: [RFC/RFT][PATCH v4 1/2] cpufreq: New governor using utilization data from the scheduler "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-27 16:30 +0100
Re: [RFC/RFT][PATCH v4 1/2] cpufreq: New governor using utilization data from the scheduler Steve Muckle <steve.muckle@linaro.org> - 2016-03-01 05:20 +0100
Re: [RFC/RFT][PATCH v4 1/2] cpufreq: New governor using utilization data from the scheduler "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-01 21:30 +0100
Re: [RFC/RFT][PATCH v4 1/2] cpufreq: New governor using utilization data from the scheduler Steve Muckle <steve.muckle@linaro.org> - 2016-03-03 04:30 +0100
Re: [RFC/RFT][PATCH v4 1/2] cpufreq: New governor using utilization data from the scheduler Steve Muckle <steve.muckle@linaro.org> - 2016-03-03 04:40 +0100
Re: [RFC/RFT][PATCH v4 1/2] cpufreq: New governor using utilization data from the scheduler "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-03 20:30 +0100
[RFC/RFT][PATCH v2 2/2] cpufreq: schedutil: Switching frequencies from interrupt context "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-24 02:30 +0100
[RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-25 00:30 +0100
Re: [RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context Peter Zijlstra <peterz@infradead.org> - 2016-02-25 10:10 +0100
Re: [RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context Peter Zijlstra <peterz@infradead.org> - 2016-02-25 10:20 +0100
Re: [RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-25 12:20 +0100
Re: [RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-25 12:10 +0100
Re: [RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context Peter Zijlstra <peterz@infradead.org> - 2016-02-25 13:00 +0100
Re: [RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-25 22:00 +0100
[RFC/RFT][PATCH v4 2/2] cpufreq: schedutil: Switching frequencies from interrupt context "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-25 22:20 +0100
csiph-web