Skip to content

Commit

Permalink
cpufreq: conservative: set requested_freq to policy max when it is ov…
Browse files Browse the repository at this point in the history
…er policy max

When requested_freq is over policy->max, set it to policy->max.
This can help to speed up decreasing frequency.

Signed-off-by: Xiaoguang Chen <chenxg@marvell.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Xiaoguang Chen authored and Rafael J. Wysocki committed Nov 12, 2013
1 parent 3baa976 commit 6d7bcb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/cpufreq/cpufreq_conservative.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ static void cs_check_cpu(int cpu, unsigned int load)

dbs_info->requested_freq += get_freq_target(cs_tuners, policy);

if (dbs_info->requested_freq > policy->max)
dbs_info->requested_freq = policy->max;

__cpufreq_driver_target(policy, dbs_info->requested_freq,
CPUFREQ_RELATION_H);
return;
Expand Down

0 comments on commit 6d7bcb1

Please sign in to comment.