]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - Documentation/cpu-freq/user-guide.txt
Merge master.kernel.org:/home/rmk/linux-2.6-arm
[mirror_ubuntu-artful-kernel.git] / Documentation / cpu-freq / user-guide.txt
CommitLineData
1da177e4
LT
1 CPU frequency and voltage scaling code in the Linux(TM) kernel
2
3
4 L i n u x C P U F r e q
5
6 U S E R G U I D E
7
8
9 Dominik Brodowski <linux@brodo.de>
10
11
12
13 Clock scaling allows you to change the clock speed of the CPUs on the
14 fly. This is a nice method to save battery power, because the lower
15 the clock speed, the less power the CPU consumes.
16
17
18Contents:
19---------
201. Supported Architectures and Processors
211.1 ARM
221.2 x86
231.3 sparc64
241.4 ppc
251.5 SuperH
26
272. "Policy" / "Governor"?
282.1 Policy
292.2 Governor
30
313. How to change the CPU cpufreq policy and/or speed
323.1 Preferred interface: sysfs
333.2 Deprecated interfaces
34
35
36
371. Supported Architectures and Processors
38=========================================
39
401.1 ARM
41-------
42
43The following ARM processors are supported by cpufreq:
44
45ARM Integrator
46ARM-SA1100
47ARM-SA1110
9e2697ff 48Intel PXA
1da177e4
LT
49
50
511.2 x86
52-------
53
54The following processors for the x86 architecture are supported by cpufreq:
55
56AMD Elan - SC400, SC410
57AMD mobile K6-2+
58AMD mobile K6-3+
59AMD mobile Duron
60AMD mobile Athlon
61AMD Opteron
62AMD Athlon 64
63Cyrix Media GXm
64Intel mobile PIII and Intel mobile PIII-M on certain chipsets
65Intel Pentium 4, Intel Xeon
66Intel Pentium M (Centrino)
67National Semiconductors Geode GX
68Transmeta Crusoe
69Transmeta Efficeon
70VIA Cyrix 3 / C3
71various processors on some ACPI 2.0-compatible systems [*]
72
73[*] Only if "ACPI Processor Performance States" are available
74to the ACPI<->BIOS interface.
75
76
771.3 sparc64
78-----------
79
80The following processors for the sparc64 architecture are supported by
81cpufreq:
82
83UltraSPARC-III
84
85
861.4 ppc
87-------
88
89Several "PowerBook" and "iBook2" notebooks are supported.
90
91
921.5 SuperH
93----------
94
95The following SuperH processors are supported by cpufreq:
96
97SH-3
98SH-4
99
100
1012. "Policy" / "Governor" ?
102==========================
103
104Some CPU frequency scaling-capable processor switch between various
105frequencies and operating voltages "on the fly" without any kernel or
106user involvement. This guarantees very fast switching to a frequency
107which is high enough to serve the user's needs, but low enough to save
108power.
109
110
1112.1 Policy
112----------
113
114On these systems, all you can do is select the lower and upper
115frequency limit as well as whether you want more aggressive
116power-saving or more instantly available processing power.
117
118
1192.2 Governor
120------------
121
122On all other cpufreq implementations, these boundaries still need to
123be set. Then, a "governor" must be selected. Such a "governor" decides
124what speed the processor shall run within the boundaries. One such
125"governor" is the "userspace" governor. This one allows the user - or
126a yet-to-implement userspace program - to decide what specific speed
127the processor shall run at.
128
129
1303. How to change the CPU cpufreq policy and/or speed
131====================================================
132
1333.1 Preferred Interface: sysfs
134------------------------------
135
136The preferred interface is located in the sysfs filesystem. If you
137mounted it at /sys, the cpufreq interface is located in a subdirectory
138"cpufreq" within the cpu-device directory
139(e.g. /sys/devices/system/cpu/cpu0/cpufreq/ for the first CPU).
140
141cpuinfo_min_freq : this file shows the minimum operating
142 frequency the processor can run at(in kHz)
143cpuinfo_max_freq : this file shows the maximum operating
144 frequency the processor can run at(in kHz)
145scaling_driver : this file shows what cpufreq driver is
146 used to set the frequency on this CPU
147
148scaling_available_governors : this file shows the CPUfreq governors
149 available in this kernel. You can see the
150 currently activated governor in
151
152scaling_governor, and by "echoing" the name of another
153 governor you can change it. Please note
154 that some governors won't load - they only
155 work on some specific architectures or
156 processors.
605400a8
DW
157
158cpuinfo_cur_freq : Current speed of the CPU, in KHz.
159
160scaling_available_frequencies : List of available frequencies, in KHz.
161
9c9a43ed 162scaling_min_freq and
1da177e4
LT
163scaling_max_freq show the current "policy limits" (in
164 kHz). By echoing new values into these
165 files, you can change these limits.
9c9a43ed
MD
166 NOTE: when setting a policy you need to
167 first set scaling_max_freq, then
168 scaling_min_freq.
1da177e4 169
605400a8
DW
170affected_cpus : List of CPUs that require software coordination
171 of frequency.
172
173related_cpus : List of CPUs that need some sort of frequency
174 coordination, whether software or hardware.
175
176scaling_driver : Hardware driver for cpufreq.
177
178scaling_cur_freq : Current frequency of the CPU, in KHz.
1da177e4
LT
179
180If you have selected the "userspace" governor which allows you to
181set the CPU operating frequency to a specific value, you can read out
182the current frequency in
183
184scaling_setspeed. By "echoing" a new frequency into this
185 you can change the speed of the CPU,
186 but only within the limits of
187 scaling_min_freq and scaling_max_freq.
188
189
1903.2 Deprecated Interfaces
191-------------------------
192
193Depending on your kernel configuration, you might find the following
194cpufreq-related files:
195/proc/cpufreq
196/proc/sys/cpu/*/speed
197/proc/sys/cpu/*/speed-min
198/proc/sys/cpu/*/speed-max
199
200These are files for deprecated interfaces to cpufreq, which offer far
201less functionality. Because of this, these interfaces aren't described
202here.
203