]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.drivers/cpufreq_parameterize_down_differential_4.patch
Add a patch to fix Intel E100 wake-on-lan problems.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / cpufreq_parameterize_down_differential_4.patch
1 From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
2 Subject: cpufreq, ondemand: Use a parameter for down differential
3
4 Use a parameter for down differential, instead of hardcoded 10%. Follow-on
5 patch changes the down-differential dynamically, based on whether
6 we are using idle micro-accounting or not.
7
8 Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
9 Signed-off-by: Thomas Renninger <trenn@suse.de>
10
11 ---
12 drivers/cpufreq/cpufreq_ondemand.c | 11 +++++++++--
13 1 file changed, 9 insertions(+), 2 deletions(-)
14
15 Index: cpufreq.git/drivers/cpufreq/cpufreq_ondemand.c
16 ===================================================================
17 --- cpufreq.git.orig/drivers/cpufreq/cpufreq_ondemand.c 2008-07-31 14:52:10.000000000 -0700
18 +++ cpufreq.git/drivers/cpufreq/cpufreq_ondemand.c 2008-07-31 14:52:15.000000000 -0700
19 @@ -24,6 +24,7 @@
20 * It helps to keep variable names smaller, simpler
21 */
22
23 +#define DEF_FREQUENCY_DOWN_DIFFERENTIAL (10)
24 #define DEF_FREQUENCY_UP_THRESHOLD (80)
25 #define MIN_FREQUENCY_UP_THRESHOLD (11)
26 #define MAX_FREQUENCY_UP_THRESHOLD (100)
27 @@ -86,10 +87,12 @@ static struct workqueue_struct *kondeman
28 static struct dbs_tuners {
29 unsigned int sampling_rate;
30 unsigned int up_threshold;
31 + unsigned int down_differential;
32 unsigned int ignore_nice;
33 unsigned int powersave_bias;
34 } dbs_tuners_ins = {
35 .up_threshold = DEF_FREQUENCY_UP_THRESHOLD,
36 + .down_differential = DEF_FREQUENCY_DOWN_DIFFERENTIAL,
37 .ignore_nice = 0,
38 .powersave_bias = 0,
39 };
40 @@ -424,9 +427,13 @@ static void dbs_check_cpu(struct cpu_dbs
41 * can support the current CPU usage without triggering the up
42 * policy. To be safe, we focus 10 points under the threshold.
43 */
44 - if (max_load_freq < (dbs_tuners_ins.up_threshold - 10) * policy->cur) {
45 + if (max_load_freq <
46 + (dbs_tuners_ins.up_threshold - dbs_tuners_ins.down_differential) *
47 + policy->cur) {
48 unsigned int freq_next;
49 - freq_next = max_load_freq / (dbs_tuners_ins.up_threshold - 10);
50 + freq_next = max_load_freq /
51 + (dbs_tuners_ins.up_threshold -
52 + dbs_tuners_ins.down_differential);
53
54 if (!dbs_tuners_ins.powersave_bias) {
55 __cpufreq_driver_target(policy, freq_next,
56
57 --