diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 14:04:08 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-26 14:04:08 -0400 |
| commit | ada19a31a90b4f46c040c25ef4ef8ffc203c7fc6 (patch) | |
| tree | 7d523d2d90dbaa973c5843d6219ec149b5949243 | |
| parent | 8d80ce80e1d58ba9cd3e3972b112cccd6b4008f4 (diff) | |
| parent | 36e8abf3edcd2d207193ec5741d1a2a645d470a5 (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: (35 commits)
[CPUFREQ] Prevent p4-clockmod from auto-binding to the ondemand governor.
[CPUFREQ] Make cpufreq-nforce2 less obnoxious
[CPUFREQ] p4-clockmod reports wrong frequency.
[CPUFREQ] powernow-k8: Use a common exit path.
[CPUFREQ] Change link order of x86 cpufreq modules
[CPUFREQ] conservative: remove 10x from def_sampling_rate
[CPUFREQ] conservative: fixup governor to function more like ondemand logic
[CPUFREQ] conservative: fix dbs_cpufreq_notifier so freq is not locked
[CPUFREQ] conservative: amend author's email address
[CPUFREQ] Use swap() in longhaul.c
[CPUFREQ] checkpatch cleanups for acpi-cpufreq
[CPUFREQ] powernow-k8: Only print error message once, not per core.
[CPUFREQ] ondemand/conservative: sanitize sampling_rate restrictions
[CPUFREQ] ondemand/conservative: deprecate sampling_rate{min,max}
[CPUFREQ] powernow-k8: Always compile powernow-k8 driver with ACPI support
[CPUFREQ] Introduce /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_transition_latency
[CPUFREQ] checkpatch cleanups for powernow-k8
[CPUFREQ] checkpatch cleanups for ondemand governor.
[CPUFREQ] checkpatch cleanups for powernow-k7
[CPUFREQ] checkpatch cleanups for speedstep related drivers.
...
30 files changed, 1372 insertions, 995 deletions
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt index 5b0cfa67aff9..ce73f3eb5ddb 100644 --- a/Documentation/cpu-freq/governors.txt +++ b/Documentation/cpu-freq/governors.txt | |||
| @@ -117,10 +117,28 @@ accessible parameters: | |||
| 117 | sampling_rate: measured in uS (10^-6 seconds), this is how often you | 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 | 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 | 119 | what to do about the frequency. Typically this is set to values of |
| 120 | around '10000' or more. | 120 | around '10000' or more. It's default value is (cmp. with users-guide.txt): |
| 121 | 121 | transition_latency * 1000 | |
| 122 | show_sampling_rate_(min|max): the minimum and maximum sampling rates | 122 | The lowest value you can set is: |
| 123 | available that you may set 'sampling_rate' to. | 123 | transition_latency * 100 or it may get restricted to a value where it |
| 124 | makes not sense for the kernel anymore to poll that often which depends | ||
| 125 | on your HZ config variable (HZ=1000: max=20000us, HZ=250: max=5000). | ||
| 126 | Be aware that transition latency is in ns and sampling_rate is in us, so you | ||
| 127 | get the same sysfs value by default. | ||
| 128 | Sampling rate should always get adjusted considering the transition latency | ||
| 129 | To set the sampling rate 750 times as high as the transition latency | ||
| 130 | in the bash (as said, 1000 is default), do: | ||
| 131 | echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) \ | ||
| 132 | >ondemand/sampling_rate | ||
| 133 | |||
| 134 | show_sampling_rate_(min|max): THIS INTERFACE IS DEPRECATED, DON'T USE IT. | ||
| 135 | You can use wider ranges now and the general | ||
| 136 | cpuinfo_transition_latency variable (cmp. with user-guide.txt) can be | ||
| 137 | used to obtain exactly the same info: | ||
| 138 | show_sampling_rate_min = transtition_latency * 500 / 1000 | ||
| 139 | show_sampling_rate_max = transtition_latency * 500000 / 1000 | ||
| 140 | (divided by 1000 is to illustrate that sampling rate is in us and | ||
| 141 | transition latency is exported ns). | ||
| 124 | 142 | ||
| 125 | up_threshold: defines what the average CPU usage between the samplings | 143 | up_threshold: defines what the average CPU usage between the samplings |
| 126 | of 'sampling_rate' needs to be for the kernel to make a decision on | 144 | of 'sampling_rate' needs to be for the kernel to make a decision on |
diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt index 917918f84fc7..75f41193f3e1 100644 --- a/Documentation/cpu-freq/user-guide.txt +++ b/Documentation/cpu-freq/user-guide.txt | |||
| @@ -152,6 +152,18 @@ cpuinfo_min_freq : this file shows the minimum operating | |||
| 152 | frequency the processor can run at(in kHz) | 152 | frequency the processor can run at(in kHz) |
| 153 | cpuinfo_max_freq : this file shows the maximum operating | 153 | cpuinfo_max_freq : this file shows the maximum operating |
| 154 | frequency the processor can run at(in kHz) | 154 | frequency the processor can run at(in kHz) |
| 155 | cpuinfo_transition_latency The time it takes on this CPU to | ||
| 156 | switch between two frequencies in nano | ||
| 157 | seconds. If unknown or known to be | ||
| 158 | that high that the driver does not | ||
| 159 | work with the ondemand governor, -1 | ||
| 160 | (CPUFREQ_ETERNAL) will be returned. | ||
| 161 | Using this information can be useful | ||
| 162 | to choose an appropriate polling | ||
| 163 | frequency for a kernel governor or | ||
| 164 | userspace daemon. Make sure to not | ||
| 165 | switch the frequency too often | ||
| 166 | resulting in performance loss. | ||
| 155 | scaling_driver : this file shows what cpufreq driver is | 167 | scaling_driver : this file shows what cpufreq driver is |
| 156 | used to set the frequency on this CPU | 168 | used to set the frequency on this CPU |
| 157 | 169 | ||
diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h index 2bb6a835c453..4f5c24724856 100644 --- a/arch/x86/include/asm/timer.h +++ b/arch/x86/include/asm/timer.h | |||
| @@ -11,8 +11,8 @@ unsigned long native_calibrate_tsc(void); | |||
| 11 | 11 | ||
| 12 | #ifdef CONFIG_X86_32 | 12 | #ifdef CONFIG_X86_32 |
| 13 | extern int timer_ack; | 13 | extern int timer_ack; |
| 14 | #endif | ||
| 14 | extern int recalibrate_cpu_khz(void); | 15 | extern int recalibrate_cpu_khz(void); |
| 15 | #endif /* CONFIG_X86_32 */ | ||
| 16 | 16 | ||
| 17 | extern int no_timer_check; | 17 | extern int no_timer_check; |
| 18 | 18 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/Kconfig b/arch/x86/kernel/cpu/cpufreq/Kconfig index 65792c2cc462..52c839875478 100644 --- a/arch/x86/kernel/cpu/cpufreq/Kconfig +++ b/arch/x86/kernel/cpu/cpufreq/Kconfig | |||
| @@ -87,30 +87,15 @@ config X86_POWERNOW_K7_ACPI | |||
| 87 | config X86_POWERNOW_K8 | 87 | config X86_POWERNOW_K8 |
| 88 | tristate "AMD Opteron/Athlon64 PowerNow!" | 88 | tristate "AMD Opteron/Athlon64 PowerNow!" |
| 89 | select CPU_FREQ_TABLE | 89 | select CPU_FREQ_TABLE |
| 90 | depends on ACPI && ACPI_PROCESSOR | ||
| 90 | help | 91 | help |
| 91 | This adds the CPUFreq driver for mobile AMD Opteron/Athlon64 processors. | 92 | This adds the CPUFreq driver for K8/K10 Opteron/Athlon64 processors. |
| 92 | 93 | ||
| 93 | To compile this driver as a module, choose M here: the | 94 | To compile this driver as a module, choose M here: the |
| 94 | module will be called powernow-k8. | 95 | module will be called powernow-k8. |
| 95 | 96 | ||
| 96 | For details, take a look at <file:Documentation/cpu-freq/>. | 97 | For details, take a look at <file:Documentation/cpu-freq/>. |
| 97 | 98 | ||
| 98 | If in doubt, say N. | ||
| 99 | |||
| 100 | config X86_POWERNOW_K8_ACPI | ||
| 101 | bool | ||
| 102 | prompt "ACPI Support" if X86_32 | ||
| 103 | depends on ACPI && X86_POWERNOW_K8 && ACPI_PROCESSOR | ||
| 104 | depends on !(X86_POWERNOW_K8 = y && ACPI_PROCESSOR = m) | ||
| 105 | default y | ||
| 106 | help | ||
| 107 | This provides access to the K8s Processor Performance States via ACPI. | ||
| 108 | This driver is probably required for CPUFreq to work with multi-socket and | ||
| 109 | SMP systems. It is not required on at least some single-socket yet | ||
| 110 | multi-core systems, even if SMP is enabled. | ||
| 111 | |||
| 112 | It is safe to say Y here. | ||
| 113 | |||
| 114 | config X86_GX_SUSPMOD | 99 | config X86_GX_SUSPMOD |
| 115 | tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" | 100 | tristate "Cyrix MediaGX/NatSemi Geode Suspend Modulation" |
| 116 | depends on X86_32 && PCI | 101 | depends on X86_32 && PCI |
diff --git a/arch/x86/kernel/cpu/cpufreq/Makefile b/arch/x86/kernel/cpu/cpufreq/Makefile index 560f7760dae5..509296df294d 100644 --- a/arch/x86/kernel/cpu/cpufreq/Makefile +++ b/arch/x86/kernel/cpu/cpufreq/Makefile | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | # Link order matters. K8 is preferred to ACPI because of firmware bugs in early | ||
| 2 | # K8 systems. ACPI is preferred to all other hardware-specific drivers. | ||
| 3 | # speedstep-* is preferred over p4-clockmod. | ||
| 4 | |||
| 5 | obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o | ||
| 6 | obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o | ||
| 1 | obj-$(CONFIG_X86_POWERNOW_K6) += powernow-k6.o | 7 | obj-$(CONFIG_X86_POWERNOW_K6) += powernow-k6.o |
| 2 | obj-$(CONFIG_X86_POWERNOW_K7) += powernow-k7.o | 8 | obj-$(CONFIG_X86_POWERNOW_K7) += powernow-k7.o |
| 3 | obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o | ||
| 4 | obj-$(CONFIG_X86_LONGHAUL) += longhaul.o | 9 | obj-$(CONFIG_X86_LONGHAUL) += longhaul.o |
