]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.drivers/cpufreq_parameterize_down_differential_4.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / cpufreq_parameterize_down_differential_4.patch
diff --git a/src/patches/suse-2.6.27.31/patches.drivers/cpufreq_parameterize_down_differential_4.patch b/src/patches/suse-2.6.27.31/patches.drivers/cpufreq_parameterize_down_differential_4.patch
new file mode 100644 (file)
index 0000000..3b2e0af
--- /dev/null
@@ -0,0 +1,57 @@
+From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
+Subject: cpufreq, ondemand: Use a parameter for down differential
+
+Use a parameter for down differential, instead of hardcoded 10%. Follow-on
+patch changes the down-differential dynamically, based on whether
+we are using idle micro-accounting or not.
+
+Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
+Signed-off-by: Thomas Renninger <trenn@suse.de>
+
+---
+ drivers/cpufreq/cpufreq_ondemand.c |   11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+Index: cpufreq.git/drivers/cpufreq/cpufreq_ondemand.c
+===================================================================
+--- cpufreq.git.orig/drivers/cpufreq/cpufreq_ondemand.c        2008-07-31 14:52:10.000000000 -0700
++++ cpufreq.git/drivers/cpufreq/cpufreq_ondemand.c     2008-07-31 14:52:15.000000000 -0700
+@@ -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)
+@@ -86,10 +87,12 @@ static struct workqueue_struct     *kondeman
+ 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,
+ };
+@@ -424,9 +427,13 @@ static void dbs_check_cpu(struct cpu_dbs
+        * 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,
+
+--