Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110798
b: refs/heads/master
c: e9d95bf
h: refs/heads/master
v: v3
  • Loading branch information
venkatesh.pallipadi@intel.com authored and Dave Jones committed Oct 9, 2008
1 parent c5117ab commit 4e67423
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 3430502d356284ff4f7782d75bb01a402fd3d45e
refs/heads/master: e9d95bf7eb929b9ddc9af9f4327b76c77ed4c7d6
11 changes: 9 additions & 2 deletions trunk/drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* It helps to keep variable names smaller, simpler
*/

#define DEF_FREQUENCY_DOWN_DIFFERENTIAL (10)
#define DEF_FREQUENCY_UP_THRESHOLD (80)
#define MIN_FREQUENCY_UP_THRESHOLD (11)
#define MAX_FREQUENCY_UP_THRESHOLD (100)
Expand Down Expand Up @@ -86,10 +87,12 @@ static struct workqueue_struct *kondemand_wq;
static struct dbs_tuners {
unsigned int sampling_rate;
unsigned int up_threshold;
unsigned int down_differential;
unsigned int ignore_nice;
unsigned int powersave_bias;
} dbs_tuners_ins = {
.up_threshold = DEF_FREQUENCY_UP_THRESHOLD,
.down_differential = DEF_FREQUENCY_DOWN_DIFFERENTIAL,
.ignore_nice = 0,
.powersave_bias = 0,
};
Expand Down Expand Up @@ -424,9 +427,13 @@ 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 (max_load_freq < (dbs_tuners_ins.up_threshold - 10) * policy->cur) {
if (max_load_freq <
(dbs_tuners_ins.up_threshold - dbs_tuners_ins.down_differential) *
policy->cur) {
unsigned int freq_next;
freq_next = max_load_freq / (dbs_tuners_ins.up_threshold - 10);
freq_next = max_load_freq /
(dbs_tuners_ins.up_threshold -
dbs_tuners_ins.down_differential);

if (!dbs_tuners_ins.powersave_bias) {
__cpufreq_driver_target(policy, freq_next,
Expand Down

0 comments on commit 4e67423

Please sign in to comment.