blob: 7fedc00c3d30b78688cf0693f1512234c7e00f9f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001 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
48
49
501.2 x86
51-------
52
53The following processors for the x86 architecture are supported by cpufreq:
54
55AMD Elan - SC400, SC410
56AMD mobile K6-2+
57AMD mobile K6-3+
58AMD mobile Duron
59AMD mobile Athlon
60AMD Opteron
61AMD Athlon 64
62Cyrix Media GXm
63Intel mobile PIII and Intel mobile PIII-M on certain chipsets
64Intel Pentium 4, Intel Xeon
65Intel Pentium M (Centrino)
66National Semiconductors Geode GX
67Transmeta Crusoe
68Transmeta Efficeon
69VIA Cyrix 3 / C3
70various processors on some ACPI 2.0-compatible systems [*]
71
72[*] Only if "ACPI Processor Performance States" are available
73to the ACPI<->BIOS interface.
74
75
761.3 sparc64
77-----------
78
79The following processors for the sparc64 architecture are supported by
80cpufreq:
81
82UltraSPARC-III
83
84
851.4 ppc
86-------
87
88Several "PowerBook" and "iBook2" notebooks are supported.
89
90
911.5 SuperH
92----------
93
94The following SuperH processors are supported by cpufreq:
95
96SH-3
97SH-4
98
99
1002. "Policy" / "Governor" ?
101==========================
102
103Some CPU frequency scaling-capable processor switch between various
104frequencies and operating voltages "on the fly" without any kernel or
105user involvement. This guarantees very fast switching to a frequency
106which is high enough to serve the user's needs, but low enough to save
107power.
108
109
1102.1 Policy
111----------
112
113On these systems, all you can do is select the lower and upper
114frequency limit as well as whether you want more aggressive
115power-saving or more instantly available processing power.
116
117
1182.2 Governor
119------------
120
121On all other cpufreq implementations, these boundaries still need to
122be set. Then, a "governor" must be selected. Such a "governor" decides
123what speed the processor shall run within the boundaries. One such
124"governor" is the "userspace" governor. This one allows the user - or
125a yet-to-implement userspace program - to decide what specific speed
126the processor shall run at.
127
128
1293. How to change the CPU cpufreq policy and/or speed
130====================================================
131
1323.1 Preferred Interface: sysfs
133------------------------------
134
135The preferred interface is located in the sysfs filesystem. If you
136mounted it at /sys, the cpufreq interface is located in a subdirectory
137"cpufreq" within the cpu-device directory
138(e.g. /sys/devices/system/cpu/cpu0/cpufreq/ for the first CPU).
139
140cpuinfo_min_freq : this file shows the minimum operating
141 frequency the processor can run at(in kHz)
142cpuinfo_max_freq : this file shows the maximum operating
143 frequency the processor can run at(in kHz)
144scaling_driver : this file shows what cpufreq driver is
145 used to set the frequency on this CPU
146
147scaling_available_governors : this file shows the CPUfreq governors
148 available in this kernel. You can see the
149 currently activated governor in
150
151scaling_governor, and by "echoing" the name of another
152 governor you can change it. Please note
153 that some governors won't load - they only
154 work on some specific architectures or
155 processors.
156scaling_min_freq and
157scaling_max_freq show the current "policy limits" (in
158 kHz). By echoing new values into these
159 files, you can change these limits.
160
161
162If you have selected the "userspace" governor which allows you to
163set the CPU operating frequency to a specific value, you can read out
164the current frequency in
165
166scaling_setspeed. By "echoing" a new frequency into this
167 you can change the speed of the CPU,
168 but only within the limits of
169 scaling_min_freq and scaling_max_freq.
170
171
1723.2 Deprecated Interfaces
173-------------------------
174
175Depending on your kernel configuration, you might find the following
176cpufreq-related files:
177/proc/cpufreq
178/proc/sys/cpu/*/speed
179/proc/sys/cpu/*/speed-min
180/proc/sys/cpu/*/speed-max
181
182These are files for deprecated interfaces to cpufreq, which offer far
183less functionality. Because of this, these interfaces aren't described
184here.
185