Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190246
b: refs/heads/master
c: fd187aa
h: refs/heads/master
v: v3
  • Loading branch information
Dominik Brodowski authored and Dave Jones committed Mar 31, 2010
1 parent a5ff248 commit d9e1cf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 499bca9b6d3243f9278a1f5a22d00e67acdd844d
refs/heads/master: fd187aaf980c45f1d16a94a846faa68e24de03c8
8 changes: 6 additions & 2 deletions trunk/drivers/cpufreq/cpufreq_conservative.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ static struct attribute_group dbs_attr_group_old = {
static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
{
unsigned int load = 0;
unsigned int max_load = 0;
unsigned int freq_target;

struct cpufreq_policy *policy;
Expand Down Expand Up @@ -501,6 +502,9 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
continue;

load = 100 * (wall_time - idle_time) / wall_time;

if (load > max_load)
max_load = load;
}

/*
Expand All @@ -511,7 +515,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
return;

/* Check for frequency increase */
if (load > dbs_tuners_ins.up_threshold) {
if (max_load > dbs_tuners_ins.up_threshold) {
this_dbs_info->down_skip = 0;

/* if we are already at full speed then break out early */
Expand All @@ -538,7 +542,7 @@ static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
* can support the current CPU usage without triggering the up
* policy. To be safe, we focus 10 points under the threshold.
*/
if (load < (dbs_tuners_ins.down_threshold - 10)) {
if (max_load < (dbs_tuners_ins.down_threshold - 10)) {
freq_target = (dbs_tuners_ins.freq_step * policy->max) / 100;

this_dbs_info->requested_freq -= freq_target;
Expand Down

0 comments on commit d9e1cf4

Please sign in to comment.