Stratos Karafotis 1e4988563d 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>
2014-05-20 14:02:09 +02:00
..
2014-04-05 15:37:40 -07:00
2014-04-05 15:37:40 -07:00
2014-04-18 16:57:53 -07:00
2014-04-08 13:27:40 +02:00
2014-04-22 09:28:02 -07:00
2014-04-30 09:48:54 +10:00
2014-04-29 19:23:22 +02:00
2014-04-16 12:28:47 -07:00
2014-04-09 08:39:39 -07:00
2014-04-18 16:40:08 -07:00
2014-04-24 12:53:38 -07:00
2014-04-18 16:40:08 -07:00
2014-04-05 15:37:40 -07:00
2014-04-03 14:05:02 -07:00
2014-04-16 14:07:51 -07:00