summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@nvidia.com>2011-11-30 17:42:50 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:52:02 -0800
commit0d8cdc5112f9d8a55fc34e255ee07f3c98751f80 (patch)
tree40f14db604111c394a6dde8bf01b75a4796fc102 /drivers/cpufreq
parentd7d5c43f747b055c01ff56dec68c6b932bcbf56b (diff)
Revert "cpufreq: interactive governor: go to intermediate hi speed before max"
This reverts commit d7e7e4f15c62464dfa5d2c58d73bc66f131795bc. Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R4a8c8c91c64c2c1d64ecb22dfe8a7c2cd133fd39
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq_interactive.c57
1 files changed, 13 insertions, 44 deletions
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index 859fdc14166f..72ae6533a2d4 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -58,12 +58,9 @@ static cpumask_t down_cpumask;
static spinlock_t down_cpumask_lock;
static struct mutex set_speed_lock;
-/* Hi speed to bump to from lo speed when load burst (default max) */
-static u64 hispeed_freq;
-
-/* Go to hi speed when CPU load at or above this value. */
-#define DEFAULT_GO_HISPEED_LOAD 95
-static unsigned long go_hispeed_load;
+/* Go to max speed when CPU load at or above this value. */
+#define DEFAULT_GO_MAXSPEED_LOAD 95
+static unsigned long go_maxspeed_load;
/*
* The minimum amount of time to spend at a frequency before we can ramp down.
@@ -162,9 +159,9 @@ static void cpufreq_interactive_timer(unsigned long data)
if (load_since_change > cpu_load)
cpu_load = load_since_change;
- if (cpu_load >= go_hispeed_load) {
+ if (cpu_load >= go_maxspeed_load) {
if (pcpu->policy->cur == pcpu->policy->min)
- new_freq = hispeed_freq;
+ new_freq = pcpu->policy->max;
else
new_freq = pcpu->policy->max * cpu_load / 100;
} else {
@@ -430,37 +427,13 @@ static void cpufreq_interactive_freq_down(struct work_struct *work)
}
}
-static ssize_t show_hispeed_freq(struct kobject *kobj,
- struct attribute *attr, char *buf)
-{
- return sprintf(buf, "%llu\n", hispeed_freq);
-}
-
-static ssize_t store_hispeed_freq(struct kobject *kobj,
- struct attribute *attr, const char *buf,
- size_t count)
-{
- int ret;
- u64 val;
-
- ret = strict_strtoull(buf, 0, &val);
- if (ret < 0)
- return ret;
- hispeed_freq = val;
- return count;
-}
-
-static struct global_attr hispeed_freq_attr = __ATTR(hispeed_freq, 0644,
- show_hispeed_freq, store_hispeed_freq);
-
-
-static ssize_t show_go_hispeed_load(struct kobject *kobj,
+static ssize_t show_go_maxspeed_load(struct kobject *kobj,
struct attribute *attr, char *buf)
{
- return sprintf(buf, "%lu\n", go_hispeed_load);
+ return sprintf(buf, "%lu\n", go_maxspeed_load);
}
-static ssize_t store_go_hispeed_load(struct kobject *kobj,
+static ssize_t store_go_maxspeed_load(struct kobject *kobj,
struct attribute *attr, const char *buf, size_t count)
{
int ret;
@@ -469,12 +442,12 @@ static ssize_t store_go_hispeed_load(struct kobject *kobj,
ret = strict_strtoul(buf, 0, &val);
if (ret < 0)
return ret;
- go_hispeed_load = val;
+ go_maxspeed_load = val;
return count;
}
-static struct global_attr go_hispeed_load_attr = __ATTR(go_hispeed_load, 0644,
- show_go_hispeed_load, store_go_hispeed_load);
+static struct global_attr go_maxspeed_load_attr = __ATTR(go_maxspeed_load, 0644,
+ show_go_maxspeed_load, store_go_maxspeed_load);
static ssize_t show_min_sample_time(struct kobject *kobj,
struct attribute *attr, char *buf)
@@ -521,8 +494,7 @@ static struct global_attr timer_rate_attr = __ATTR(timer_rate, 0644,
show_timer_rate, store_timer_rate);
static struct attribute *interactive_attributes[] = {
- &hispeed_freq_attr.attr,
- &go_hispeed_load_attr.attr,
+ &go_maxspeed_load_attr.attr,
&min_sample_time_attr.attr,
&timer_rate_attr.attr,
NULL,
@@ -561,9 +533,6 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
smp_wmb();
}
- if (!hispeed_freq)
- hispeed_freq = policy->max;
-
/*
* Do not register the idle hook and create sysfs
* entries if we have already done so.
@@ -641,7 +610,7 @@ static int __init cpufreq_interactive_init(void)
struct cpufreq_interactive_cpuinfo *pcpu;
struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
- go_hispeed_load = DEFAULT_GO_HISPEED_LOAD;
+ go_maxspeed_load = DEFAULT_GO_MAXSPEED_LOAD;
min_sample_time = DEFAULT_MIN_SAMPLE_TIME;
timer_rate = DEFAULT_TIMER_RATE;