lkml.org 
[lkml]   [2016]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC/RFT][PATCH v3 2/2] cpufreq: schedutil: Switching frequencies from interrupt context
Date
On Thursday, February 25, 2016 10:08:40 AM 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?

Say you have 800 MHz and 1600 MHz to choose from and the request if for
900 MHz. The other may be way off (and different voltage for that matter).

Thanks,
Rafael

\
 
 \ /
  Last update: 2016-02-25 13:01    [W:0.120 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site