Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108091
b: refs/heads/master
c: f068c04
h: refs/heads/master
i:
  108089: b385a76
  108087: 77ef478
v: v3
  • Loading branch information
Dave Jones committed Aug 8, 2008
1 parent 15f3edc commit f8bcaa9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec983f7060cd73e14cdd3edd910339127a8a4e96
refs/heads/master: f068c04ba6f308774fdd2ed5e113da7cf4ff2f2b
20 changes: 10 additions & 10 deletions trunk/drivers/cpufreq/cpufreq_conservative.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ static void dbs_check_cpu(int cpu)
{
unsigned int idle_ticks, up_idle_ticks, down_idle_ticks;
unsigned int tmp_idle_ticks, total_idle_ticks;
unsigned int freq_step;
unsigned int freq_target;
unsigned int freq_down_sampling_rate;
struct cpu_dbs_info_s *this_dbs_info = &per_cpu(cpu_dbs_info, cpu);
struct cpufreq_policy *policy;
Expand Down Expand Up @@ -383,13 +383,13 @@ static void dbs_check_cpu(int cpu)
if (this_dbs_info->requested_freq == policy->max)
return;

freq_step = (dbs_tuners_ins.freq_step * policy->max) / 100;
freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100;

/* max freq cannot be less than 100. But who knows.... */
if (unlikely(freq_step == 0))
freq_step = 5;
if (unlikely(freq_target == 0))
freq_target = 5;

this_dbs_info->requested_freq += freq_step;
this_dbs_info->requested_freq += freq_target;
if (this_dbs_info->requested_freq > policy->max)
this_dbs_info->requested_freq = policy->max;

Expand Down Expand Up @@ -425,19 +425,19 @@ static void dbs_check_cpu(int cpu)
/*
* if we are already at the lowest speed then break out early
* or if we 'cannot' reduce the speed as the user might want
* freq_step to be zero
* freq_target to be zero
*/
if (this_dbs_info->requested_freq == policy->min
|| dbs_tuners_ins.freq_step == 0)
return;

freq_step = (dbs_tuners_ins.freq_step * policy->max) / 100;
freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100;

/* max freq cannot be less than 100. But who knows.... */
if (unlikely(freq_step == 0))
freq_step = 5;
if (unlikely(freq_target == 0))
freq_target = 5;

this_dbs_info->requested_freq -= freq_step;
this_dbs_info->requested_freq -= freq_target;
if (this_dbs_info->requested_freq < policy->min)
this_dbs_info->requested_freq = policy->min;

Expand Down

0 comments on commit f8bcaa9

Please sign in to comment.