diff options
author | Stratos Karafotis <stratosk@semaphore.gr> | 2014-05-14 21:05:52 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-20 14:02:09 +0200 |
commit | 1e4988563d3c92ba756d8c86917fc1b594ebe855 (patch) | |
tree | 807afe61525fc4fb70f2e84ad6e5ff458f97652d /net/decnet/dn_dev.c | |
parent | e7b453d3dd5f251f13bf4670037af70bf611d0cb (diff) | |
download | linux-1e4988563d3c92ba756d8c86917fc1b594ebe855.tar.bz2 |
cpufreq: Break out early when frequency equals target_freq
Many drivers keep frequencies in frequency table in ascending
or descending order. When governor tries to change to policy->min
or policy->max respectively then the cpufreq_frequency_table_target
could return on first iteration. This will save some iteration cycles.
So, break out early when a frequency in cpufreq_frequency_table
equals to target one.
Testing this during kernel compilation using ondemand governor
with a frequency table in ascending order, the
cpufreq_frequency_table_target returned early on the first
iteration at about 30% of times called.
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'net/decnet/dn_dev.c')
0 files changed, 0 insertions, 0 deletions