Re: [PATCH 2.6.18-rc6-mm1 1/2] cpufreq: make it harder for cpu toleave "hot" mode

From: Nick Orlov
Date: Mon Sep 11 2006 - 23:28:22 EST


From: Nick Orlov <bugfixer@xxxxxxx>

Make hysteresis wider (20% instead of 10).

Signed-off-by: Nick Orlov <bugfixer@xxxxxxx>

--- linux-2.6.18-rc6/drivers/cpufreq/cpufreq_ondemand.c 2006-09-11 21:22:50.000000000 -0400
+++ linux-2.6.18-rc6-mm1-nick/drivers/cpufreq/cpufreq_ondemand.c 2006-09-11 20:49:10.000000000 -0400
@@ -25,7 +25,7 @@
*/

#define DEF_FREQUENCY_UP_THRESHOLD (80)
-#define MIN_FREQUENCY_UP_THRESHOLD (11)
+#define MIN_FREQUENCY_UP_THRESHOLD (21)
#define MAX_FREQUENCY_UP_THRESHOLD (100)

/*
@@ -290,12 +315,12 @@
/*
* The optimal frequency is the frequency that is the lowest that
* can support the current CPU usage without triggering the up
- * policy. To be safe, we focus 10 points under the threshold.
+ * policy. To be safe, we focus 20 points under the threshold.
*/
- if (load < (dbs_tuners_ins.up_threshold - 10)) {
+ if (load < (dbs_tuners_ins.up_threshold - 20)) {
unsigned int freq_next;
freq_next = (policy->cur * load) /
- (dbs_tuners_ins.up_threshold - 10);
+ (dbs_tuners_ins.up_threshold - 20);

__cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_L);
}
_

--
With best wishes,
Nick Orlov.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/