diff options
-rw-r--r-- | Documentation/cpu-freq/governors.txt | 62 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c | 3 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 50 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/powernow-k8.h | 9 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_conservative.c | 10 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq_ondemand.c | 10 |
6 files changed, 104 insertions, 40 deletions
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt index 933fae74c337..f4b8dc4237e6 100644 --- a/Documentation/cpu-freq/governors.txt +++ b/Documentation/cpu-freq/governors.txt | |||
@@ -27,6 +27,7 @@ Contents: | |||
27 | 2.2 Powersave | 27 | 2.2 Powersave |
28 | 2.3 Userspace | 28 | 2.3 Userspace |
29 | 2.4 Ondemand | 29 | 2.4 Ondemand |
30 | 2.5 Conservative | ||
30 | 31 | ||
31 | 3. The Governor Interface in the CPUfreq Core | 32 | 3. The Governor Interface in the CPUfreq Core |
32 | 33 | ||
@@ -110,9 +111,64 @@ directory. | |||
110 | 111 | ||
111 | The CPUfreq govenor "ondemand" sets the CPU depending on the | 112 | The CPUfreq govenor "ondemand" sets the CPU depending on the |
112 | current usage. To do this the CPU must have the capability to | 113 | current usage. To do this the CPU must have the capability to |
113 | switch the frequency very fast. | 114 | switch the frequency very quickly. There are a number of sysfs file |
114 | 115 | accessible parameters: | |
115 | 116 | ||
117 | sampling_rate: measured in uS (10^-6 seconds), this is how often you | ||
118 | want the kernel to look at the CPU usage and to make decisions on | ||
119 | what to do about the frequency. Typically this is set to values of | ||
120 | around '10000' or more. | ||
121 | |||
122 | show_sampling_rate_(min|max): the minimum and maximum sampling rates | ||
123 | available that you may set 'sampling_rate' to. | ||
124 | |||
125 | up_threshold: defines what the average CPU usaged between the samplings | ||
126 | of 'sampling_rate' needs to be for the kernel to make a decision on | ||
127 | whether it should increase the frequency. For example when it is set | ||
128 | to its default value of '80' it means that between the checking | ||
129 | intervals the CPU needs to be on average more than 80% in use to then | ||
130 | decide that the CPU frequency needs to be increased. | ||
131 | |||
132 | sampling_down_factor: this parameter controls the rate that the CPU | ||
133 | makes a decision on when to decrease the frequency. When set to its | ||
134 | default value of '5' it means that at 1/5 the sampling_rate the kernel | ||
135 | makes a decision to lower the frequency. Five "lower rate" decisions | ||
136 | have to be made in a row before the CPU frequency is actually lower. | ||
137 | If set to '1' then the frequency decreases as quickly as it increases, | ||
138 | if set to '2' it decreases at half the rate of the increase. | ||
139 | |||
140 | ignore_nice_load: this parameter takes a value of '0' or '1', when set | ||
141 | to '0' (its default) then all processes are counted towards towards the | ||
142 | 'cpu utilisation' value. When set to '1' then processes that are | ||
143 | run with a 'nice' value will not count (and thus be ignored) in the | ||
144 | overal usage calculation. This is useful if you are running a CPU | ||
145 | intensive calculation on your laptop that you do not care how long it | ||
146 | takes to complete as you can 'nice' it and prevent it from taking part | ||
147 | in the deciding process of whether to increase your CPU frequency. | ||
148 | |||
149 | |||
150 | 2.5 Conservative | ||
151 | ---------------- | ||
152 | |||
153 | The CPUfreq governor "conservative", much like the "ondemand" | ||
154 | governor, sets the CPU depending on the current usage. It differs in | ||
155 | behaviour in that it gracefully increases and decreases the CPU speed | ||
156 | rather than jumping to max speed the moment there is any load on the | ||
157 | CPU. This behaviour more suitable in a battery powered environment. | ||
158 | The governor is tweaked in the same manner as the "ondemand" governor | ||
159 | through sysfs with the addition of: | ||
160 | |||
161 | freq_step: this describes what percentage steps the cpu freq should be | ||
162 | increased and decreased smoothly by. By default the cpu frequency will | ||
163 | increase in 5% chunks of your maximum cpu frequency. You can change this | ||
164 | value to anywhere between 0 and 100 where '0' will effectively lock your | ||
165 | CPU at a speed regardless of its load whilst '100' will, in theory, make | ||
166 | it behave identically to the "ondemand" governor. | ||
167 | |||
168 | down_threshold: same as the 'up_threshold' found for the "ondemand" | ||
169 | governor but for the opposite direction. For example when set to its | ||
170 | default value of '20' it means that if the CPU usage needs to be below | ||
171 | 20% between samples to have the frequency decreased. | ||
116 | 172 | ||
117 | 3. The Governor Interface in the CPUfreq Core | 173 | 3. The Governor Interface in the CPUfreq Core |
118 | ============================================= | 174 | ============================================= |
diff --git a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c index 04a405345203..2b62dee35c6c 100644 --- a/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c +++ b/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c | |||
@@ -177,9 +177,10 @@ static unsigned int nforce2_fsb_read(int bootfsb) | |||
177 | */ | 177 | */ |
178 | static int nforce2_set_fsb(unsigned int fsb) | 178 | static int nforce2_set_fsb(unsigned int fsb) |
179 | { | 179 | { |
180 | u32 pll, temp = 0; | 180 | u32 temp = 0; |
181 | unsigned int tfsb; | 181 | unsigned int tfsb; |
182 | int diff; | 182 | int diff; |
183 | int pll = 0; | ||
183 | 184 | ||
184 | if ((fsb > max_fsb) || (fsb < NFORCE2_MIN_FSB)) { | 185 | if ((fsb > max_fsb) || (fsb < NFORCE2_MIN_FSB)) { |
185 | printk(KERN_ERR "cpufreq: FSB %d is out of range!\n", fsb); | 186 | printk(KERN_ERR "cpufreq: FSB %d is out of range!\n", fsb); |
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 68a1fc87f4ca..0fbbd4c1072e 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -45,7 +45,7 @@ | |||
45 | 45 | ||
46 | #define PFX "powernow-k8: " | 46 | #define PFX "powernow-k8: " |
47 | #define BFX PFX "BIOS error: " | 47 | #define BFX PFX "BIOS error: " |
48 | #define VERSION "version 1.50.4" | 48 | #define VERSION "version 1.60.0" |
49 | #include "powernow-k8.h" | 49 | #include "powernow-k8.h" |
50 | 50 | ||
51 | /* serialize freq changes */ | 51 | /* serialize freq changes */ |
@@ -216,10 +216,10 @@ static int write_new_vid(struct powernow_k8_data *data, u32 vid) | |||
216 | 216 | ||
217 | do { | 217 | do { |
218 | wrmsr(MSR_FIDVID_CTL, lo, STOP_GRANT_5NS); | 218 | wrmsr(MSR_FIDVID_CTL, lo, STOP_GRANT_5NS); |
219 | if (i++ > 100) { | 219 | if (i++ > 100) { |
220 | printk(KERN_ERR PFX "internal error - pending bit very stuck - no further pstate changes possible\n"); | 220 | printk(KERN_ERR PFX "internal error - pending bit very stuck - no further pstate changes possible\n"); |
221 | return 1; | 221 | return 1; |
222 | } | 222 | } |
223 | } while (query_current_values_with_pending_wait(data)); | 223 | } while (query_current_values_with_pending_wait(data)); |
224 | 224 | ||
225 | if (savefid != data->currfid) { | 225 | if (savefid != data->currfid) { |
@@ -336,7 +336,7 @@ static int core_voltage_pre_transition(struct powernow_k8_data *data, u32 reqvid | |||
336 | /* Phase 2 - core frequency transition */ | 336 | /* Phase 2 - core frequency transition */ |
337 | static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid) | 337 | static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid) |
338 | { | 338 | { |
339 | u32 vcoreqfid, vcocurrfid, vcofiddiff, savevid = data->currvid; | 339 | u32 vcoreqfid, vcocurrfid, vcofiddiff, fid_interval, savevid = data->currvid; |
340 | 340 | ||
341 | if ((reqfid < HI_FID_TABLE_BOTTOM) && (data->currfid < HI_FID_TABLE_BOTTOM)) { | 341 | if ((reqfid < HI_FID_TABLE_BOTTOM) && (data->currfid < HI_FID_TABLE_BOTTOM)) { |
342 | printk(KERN_ERR PFX "ph2: illegal lo-lo transition 0x%x 0x%x\n", | 342 | printk(KERN_ERR PFX "ph2: illegal lo-lo transition 0x%x 0x%x\n", |
@@ -359,9 +359,11 @@ static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid) | |||
359 | : vcoreqfid - vcocurrfid; | 359 | : vcoreqfid - vcocurrfid; |
360 | 360 | ||
361 | while (vcofiddiff > 2) { | 361 | while (vcofiddiff > 2) { |
362 | (data->currfid & 1) ? (fid_interval = 1) : (fid_interval = 2); | ||
363 | |||
362 | if (reqfid > data->currfid) { | 364 | if (reqfid > data->currfid) { |
363 | if (data->currfid > LO_FID_TABLE_TOP) { | 365 | if (data->currfid > LO_FID_TABLE_TOP) { |
364 | if (write_new_fid(data, data->currfid + 2)) { | 366 | if (write_new_fid(data, data->currfid + fid_interval)) { |
365 | return 1; | 367 | return 1; |
366 | } | 368 | } |
367 | } else { | 369 | } else { |
@@ -371,7 +373,7 @@ static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid) | |||
371 | } | 373 | } |
372 | } | 374 | } |
373 | } else { | 375 | } else { |
374 | if (write_new_fid(data, data->currfid - 2)) | 376 | if (write_new_fid(data, data->currfid - fid_interval)) |
375 | return 1; | 377 | return 1; |
376 | } | 378 | } |
377 | 379 | ||
@@ -464,7 +466,7 @@ static int check_supported_cpu(unsigned int cpu) | |||
464 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 466 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); |
465 | 467 | ||
466 | if (smp_processor_id() != cpu) { | 468 | if (smp_processor_id() != cpu) { |
467 | printk(KERN_ERR "limiting to cpu %u failed\n", cpu); | 469 | printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu); |
468 | goto out; | 470 | goto out; |
469 | } | 471 | } |
470 | 472 | ||
@@ -474,7 +476,7 @@ static int check_supported_cpu(unsigned int cpu) | |||
474 | eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE); | 476 | eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE); |
475 | if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) || | 477 | if (((eax & CPUID_USE_XFAM_XMOD) != CPUID_USE_XFAM_XMOD) || |
476 | ((eax & CPUID_XFAM) != CPUID_XFAM_K8) || | 478 | ((eax & CPUID_XFAM) != CPUID_XFAM_K8) || |
477 | ((eax & CPUID_XMOD) > CPUID_XMOD_REV_F)) { | 479 | ((eax & CPUID_XMOD) > CPUID_XMOD_REV_G)) { |
478 | printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax); | 480 | printk(KERN_INFO PFX "Processor cpuid %x not supported\n", eax); |
479 | goto out; | 481 | goto out; |
480 | } | 482 | } |
@@ -517,22 +519,24 @@ static int check_pst_table(struct powernow_k8_data *data, struct pst_s *pst, u8 | |||
517 | printk(KERN_ERR BFX "maxvid exceeded with pstate %d\n", j); | 519 | printk(KERN_ERR BFX "maxvid exceeded with pstate %d\n", j); |
518 | return -ENODEV; | 520 | return -ENODEV; |
519 | } | 521 | } |
520 | if ((pst[j].fid > MAX_FID) | 522 | if (pst[j].fid > MAX_FID) { |
521 | || (pst[j].fid & 1) | 523 | printk(KERN_ERR BFX "maxfid exceeded with pstate %d\n", j); |
522 | || (j && (pst[j].fid < HI_FID_TABLE_BOTTOM))) { | 524 | return -ENODEV; |
525 | } | ||
526 | if (j && (pst[j].fid < HI_FID_TABLE_BOTTOM)) { | ||
523 | /* Only first fid is allowed to be in "low" range */ | 527 | /* Only first fid is allowed to be in "low" range */ |
524 | printk(KERN_ERR PFX "two low fids - %d : 0x%x\n", j, pst[j].fid); | 528 | printk(KERN_ERR BFX "two low fids - %d : 0x%x\n", j, pst[j].fid); |
525 | return -EINVAL; | 529 | return -EINVAL; |
526 | } | 530 | } |
527 | if (pst[j].fid < lastfid) | 531 | if (pst[j].fid < lastfid) |
528 | lastfid = pst[j].fid; | 532 | lastfid = pst[j].fid; |
529 | } | 533 | } |
530 | if (lastfid & 1) { | 534 | if (lastfid & 1) { |
531 | printk(KERN_ERR PFX "lastfid invalid\n"); | 535 | printk(KERN_ERR BFX "lastfid invalid\n"); |
532 | return -EINVAL; | 536 | return -EINVAL; |
533 | } | 537 | } |
534 | if (lastfid > LO_FID_TABLE_TOP) | 538 | if (lastfid > LO_FID_TABLE_TOP) |
535 | printk(KERN_INFO PFX "first fid not from lo freq table\n"); | 539 | printk(KERN_INFO BFX "first fid not from lo freq table\n"); |
536 | 540 | ||
537 | return 0; | 541 | return 0; |
538 | } | 542 | } |
@@ -631,7 +635,7 @@ static int find_psb_table(struct powernow_k8_data *data) | |||
631 | 635 | ||
632 | dprintk("table vers: 0x%x\n", psb->tableversion); | 636 | dprintk("table vers: 0x%x\n", psb->tableversion); |
633 | if (psb->tableversion != PSB_VERSION_1_4) { | 637 | if (psb->tableversion != PSB_VERSION_1_4) { |
634 | printk(KERN_INFO BFX "PSB table is not v1.4\n"); | 638 | printk(KERN_ERR BFX "PSB table is not v1.4\n"); |
635 | return -ENODEV; | 639 | return -ENODEV; |
636 | } | 640 | } |
637 | 641 | ||
@@ -689,7 +693,7 @@ static int find_psb_table(struct powernow_k8_data *data) | |||
689 | * BIOS and Kernel Developer's Guide, which is available on | 693 | * BIOS and Kernel Developer's Guide, which is available on |
690 | * www.amd.com | 694 | * www.amd.com |
691 | */ | 695 | */ |
692 | printk(KERN_INFO PFX "BIOS error - no PSB or ACPI _PSS objects\n"); | 696 | printk(KERN_ERR PFX "BIOS error - no PSB or ACPI _PSS objects\n"); |
693 | return -ENODEV; | 697 | return -ENODEV; |
694 | } | 698 | } |
695 | 699 | ||
@@ -912,7 +916,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
912 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); | 916 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); |
913 | 917 | ||
914 | if (smp_processor_id() != pol->cpu) { | 918 | if (smp_processor_id() != pol->cpu) { |
915 | printk(KERN_ERR "limiting to cpu %u failed\n", pol->cpu); | 919 | printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); |
916 | goto err_out; | 920 | goto err_out; |
917 | } | 921 | } |
918 | 922 | ||
@@ -982,6 +986,9 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
982 | cpumask_t oldmask = CPU_MASK_ALL; | 986 | cpumask_t oldmask = CPU_MASK_ALL; |
983 | int rc, i; | 987 | int rc, i; |
984 | 988 | ||
989 | if (!cpu_online(pol->cpu)) | ||
990 | return -ENODEV; | ||
991 | |||
985 | if (!check_supported_cpu(pol->cpu)) | 992 | if (!check_supported_cpu(pol->cpu)) |
986 | return -ENODEV; | 993 | return -ENODEV; |
987 | 994 | ||
@@ -1021,7 +1028,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1021 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); | 1028 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); |
1022 | 1029 | ||
1023 | if (smp_processor_id() != pol->cpu) { | 1030 | if (smp_processor_id() != pol->cpu) { |
1024 | printk(KERN_ERR "limiting to cpu %u failed\n", pol->cpu); | 1031 | printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); |
1025 | goto err_out; | 1032 | goto err_out; |
1026 | } | 1033 | } |
1027 | 1034 | ||
@@ -1162,10 +1169,9 @@ static void __exit powernowk8_exit(void) | |||
1162 | cpufreq_unregister_driver(&cpufreq_amd64_driver); | 1169 | cpufreq_unregister_driver(&cpufreq_amd64_driver); |
1163 | } | 1170 | } |
1164 | 1171 | ||
1165 | MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com."); | 1172 | MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>"); |
1166 | MODULE_DESCRIPTION("AMD Athlon 64 and Opteron processor frequency driver."); | 1173 | MODULE_DESCRIPTION("AMD Athlon 64 and Opteron processor frequency driver."); |
1167 | MODULE_LICENSE("GPL"); | 1174 | MODULE_LICENSE("GPL"); |
1168 | 1175 | ||
1169 | late_initcall(powernowk8_init); | 1176 | late_initcall(powernowk8_init); |
1170 | module_exit(powernowk8_exit); | 1177 | module_exit(powernowk8_exit); |
1171 | |||
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h index b1e85bb36396..d0de37d58e9a 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h | |||
@@ -42,7 +42,7 @@ struct powernow_k8_data { | |||
42 | #define CPUID_XFAM 0x0ff00000 /* extended family */ | 42 | #define CPUID_XFAM 0x0ff00000 /* extended family */ |
43 | #define CPUID_XFAM_K8 0 | 43 | #define CPUID_XFAM_K8 0 |
44 | #define CPUID_XMOD 0x000f0000 /* extended model */ | 44 | #define CPUID_XMOD 0x000f0000 /* extended model */ |
45 | #define CPUID_XMOD_REV_F 0x00040000 | 45 | #define CPUID_XMOD_REV_G 0x00060000 |
46 | #define CPUID_USE_XFAM_XMOD 0x00000f00 | 46 | #define CPUID_USE_XFAM_XMOD 0x00000f00 |
47 | #define CPUID_GET_MAX_CAPABILITIES 0x80000000 | 47 | #define CPUID_GET_MAX_CAPABILITIES 0x80000000 |
48 | #define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007 | 48 | #define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007 |
@@ -86,13 +86,14 @@ struct powernow_k8_data { | |||
86 | * low fid table | 86 | * low fid table |
87 | * - lowest entry in the high fid table must be a <= 200MHz + 2 * the entry | 87 | * - lowest entry in the high fid table must be a <= 200MHz + 2 * the entry |
88 | * in the low fid table | 88 | * in the low fid table |
89 | * - the parts can only step at 200 MHz intervals, so 1.9 GHz is never valid | 89 | * - the parts can only step at <= 200 MHz intervals, odd fid values are |
90 | * supported in revision G and later revisions. | ||
90 | * - lowest frequency must be >= interprocessor hypertransport link speed | 91 | * - lowest frequency must be >= interprocessor hypertransport link speed |
91 | * (only applies to MP systems obviously) | 92 | * (only applies to MP systems obviously) |
92 | */ | 93 | */ |
93 | 94 | ||
94 | /* fids (frequency identifiers) are arranged in 2 tables - lo and hi */ | 95 | /* fids (frequency identifiers) are arranged in 2 tables - lo and hi */ |
95 | #define LO_FID_TABLE_TOP 6 /* fid values marking the boundary */ | 96 | #define LO_FID_TABLE_TOP 7 /* fid values marking the boundary */ |
96 | #define HI_FID_TABLE_BOTTOM 8 /* between the low and high tables */ | 97 | #define HI_FID_TABLE_BOTTOM 8 /* between the low and high tables */ |
97 | 98 | ||
98 | #define LO_VCOFREQ_TABLE_TOP 1400 /* corresponding vco frequency values */ | 99 | #define LO_VCOFREQ_TABLE_TOP 1400 /* corresponding vco frequency values */ |
@@ -106,7 +107,7 @@ struct powernow_k8_data { | |||
106 | #define MIN_FREQ 800 /* Min and max freqs, per spec */ | 107 | #define MIN_FREQ 800 /* Min and max freqs, per spec */ |
107 | #define MAX_FREQ 5000 | 108 | #define MAX_FREQ 5000 |
108 | 109 | ||
109 | #define INVALID_FID_MASK 0xffffffc1 /* not a valid fid if these bits are set */ | 110 | #define INVALID_FID_MASK 0xffffffc0 /* not a valid fid if these bits are set */ |
110 | #define INVALID_VID_MASK 0xffffffc0 /* not a valid vid if these bits are set */ | 111 | #define INVALID_VID_MASK 0xffffffc0 /* not a valid vid if these bits are set */ |
111 | 112 | ||
112 | #define VID_OFF 0x3f | 113 | #define VID_OFF 0x3f |
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 2ed5c4363b53..39543a2bed0f 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c | |||
@@ -93,7 +93,7 @@ static inline unsigned int get_cpu_idle_time(unsigned int cpu) | |||
93 | { | 93 | { |
94 | return kstat_cpu(cpu).cpustat.idle + | 94 | return kstat_cpu(cpu).cpustat.idle + |
95 | kstat_cpu(cpu).cpustat.iowait + | 95 | kstat_cpu(cpu).cpustat.iowait + |
96 | ( !dbs_tuners_ins.ignore_nice ? | 96 | ( dbs_tuners_ins.ignore_nice ? |
97 | kstat_cpu(cpu).cpustat.nice : | 97 | kstat_cpu(cpu).cpustat.nice : |
98 | 0); | 98 | 0); |
99 | } | 99 | } |
@@ -127,7 +127,7 @@ show_one(sampling_rate, sampling_rate); | |||
127 | show_one(sampling_down_factor, sampling_down_factor); | 127 | show_one(sampling_down_factor, sampling_down_factor); |
128 | show_one(up_threshold, up_threshold); | 128 | show_one(up_threshold, up_threshold); |
129 | show_one(down_threshold, down_threshold); | 129 | show_one(down_threshold, down_threshold); |
130 | show_one(ignore_nice, ignore_nice); | 130 | show_one(ignore_nice_load, ignore_nice); |
131 | show_one(freq_step, freq_step); | 131 | show_one(freq_step, freq_step); |
132 | 132 | ||
133 | static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, | 133 | static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, |
@@ -207,7 +207,7 @@ static ssize_t store_down_threshold(struct cpufreq_policy *unused, | |||
207 | return count; | 207 | return count; |
208 | } | 208 | } |
209 | 209 | ||
210 | static ssize_t store_ignore_nice(struct cpufreq_policy *policy, | 210 | static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy, |
211 | const char *buf, size_t count) | 211 | const char *buf, size_t count) |
212 | { | 212 | { |
213 | unsigned int input; | 213 | unsigned int input; |
@@ -272,7 +272,7 @@ define_one_rw(sampling_rate); | |||
272 | define_one_rw(sampling_down_factor); | 272 | define_one_rw(sampling_down_factor); |
273 | define_one_rw(up_threshold); | 273 | define_one_rw(up_threshold); |
274 | define_one_rw(down_threshold); | 274 | define_one_rw(down_threshold); |
275 | define_one_rw(ignore_nice); | 275 | define_one_rw(ignore_nice_load); |
276 | define_one_rw(freq_step); | 276 | define_one_rw(freq_step); |
277 | 277 | ||
278 | static struct attribute * dbs_attributes[] = { | 278 | static struct attribute * dbs_attributes[] = { |
@@ -282,7 +282,7 @@ static struct attribute * dbs_attributes[] = { | |||
282 | &sampling_down_factor.attr, | 282 | &sampling_down_factor.attr, |
283 | &up_threshold.attr, | 283 | &up_threshold.attr, |
284 | &down_threshold.attr, | 284 | &down_threshold.attr, |
285 | &ignore_nice.attr, | 285 | &ignore_nice_load.attr, |
286 | &freq_step.attr, | 286 | &freq_step.attr, |
287 | NULL | 287 | NULL |
288 | }; | 288 | }; |
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index 17741111246b..e69fd8dd1f1c 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c | |||
@@ -89,7 +89,7 @@ static inline unsigned int get_cpu_idle_time(unsigned int cpu) | |||
89 | { | 89 | { |
90 | return kstat_cpu(cpu).cpustat.idle + | 90 | return kstat_cpu(cpu).cpustat.idle + |
91 | kstat_cpu(cpu).cpustat.iowait + | 91 | kstat_cpu(cpu).cpustat.iowait + |
92 | ( !dbs_tuners_ins.ignore_nice ? | 92 | ( dbs_tuners_ins.ignore_nice ? |
93 | kstat_cpu(cpu).cpustat.nice : | 93 | kstat_cpu(cpu).cpustat.nice : |
94 | 0); | 94 | 0); |
95 | } | 95 | } |
@@ -122,7 +122,7 @@ static ssize_t show_##file_name \ | |||
122 | show_one(sampling_rate, sampling_rate); | 122 | show_one(sampling_rate, sampling_rate); |
123 | show_one(sampling_down_factor, sampling_down_factor); | 123 | show_one(sampling_down_factor, sampling_down_factor); |
124 | show_one(up_threshold, up_threshold); | 124 | show_one(up_threshold, up_threshold); |
125 | show_one(ignore_nice, ignore_nice); | 125 | show_one(ignore_nice_load, ignore_nice); |
126 | 126 | ||
127 | static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, | 127 | static ssize_t store_sampling_down_factor(struct cpufreq_policy *unused, |
128 | const char *buf, size_t count) | 128 | const char *buf, size_t count) |
@@ -182,7 +182,7 @@ static ssize_t store_up_threshold(struct cpufreq_policy *unused, | |||
182 | return count; | 182 | return count; |
183 | } | 183 | } |
184 | 184 | ||
185 | static ssize_t store_ignore_nice(struct cpufreq_policy *policy, | 185 | static ssize_t store_ignore_nice_load(struct cpufreq_policy *policy, |
186 | const char *buf, size_t count) | 186 | const char *buf, size_t count) |
187 | { | 187 | { |
188 | unsigned int input; | 188 | unsigned int input; |
@@ -223,7 +223,7 @@ __ATTR(_name, 0644, show_##_name, store_##_name) | |||
223 | define_one_rw(sampling_rate); | 223 | define_one_rw(sampling_rate); |
224 | define_one_rw(sampling_down_factor); | 224 | define_one_rw(sampling_down_factor); |
225 | define_one_rw(up_threshold); | 225 | define_one_rw(up_threshold); |
226 | define_one_rw(ignore_nice); | 226 | define_one_rw(ignore_nice_load); |
227 | 227 | ||
228 | static struct attribute * dbs_attributes[] = { | 228 | static struct attribute * dbs_attributes[] = { |
229 | &sampling_rate_max.attr, | 229 | &sampling_rate_max.attr, |
@@ -231,7 +231,7 @@ static struct attribute * dbs_attributes[] = { | |||
231 | &sampling_rate.attr, | 231 | &sampling_rate.attr, |
232 | &sampling_down_factor.attr, | 232 | &sampling_down_factor.attr, |
233 | &up_threshold.attr, | 233 | &up_threshold.attr, |
234 | &ignore_nice.attr, | 234 | &ignore_nice_load.attr, |
235 | NULL | 235 | NULL |
236 | }; | 236 | }; |
237 | 237 | ||