1 CPU frequency and voltage scaling code in the Linux(TM) kernel
4 L i n u x C P U F r e q
9 Dominik Brodowski <linux@brodo.de>
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.
20 1. Supported Architectures and Processors
28 2. "Policy" / "Governor"?
32 3. How to change the CPU cpufreq policy and/or speed
33 3.1 Preferred interface: sysfs
34 3.2 Deprecated interfaces
38 1. Supported Architectures and Processors
39 =========================================
44 The following ARM processors are supported by cpufreq:
55 The following processors for the x86 architecture are supported by cpufreq:
57 AMD Elan - SC400, SC410
65 Intel mobile PIII and Intel mobile PIII-M on certain chipsets
66 Intel Pentium 4, Intel Xeon
67 Intel Pentium M (Centrino)
68 National Semiconductors Geode GX
72 various processors on some ACPI 2.0-compatible systems [*]
74 [*] Only if "ACPI Processor Performance States" are available
75 to the ACPI<->BIOS interface.
81 The following processors for the sparc64 architecture are supported by
90 Several "PowerBook" and "iBook2" notebooks are supported.
96 All SuperH processors supporting rate rounding through the clock
97 framework are supported by cpufreq.
102 The following Blackfin processors are supported by cpufreq:
104 BF522, BF523, BF524, BF525, BF526, BF527, Rev 0.1 or higher
105 BF531, BF532, BF533, Rev 0.3 or higher
106 BF534, BF536, BF537, Rev 0.2 or higher
107 BF561, Rev 0.3 or higher
108 BF542, BF544, BF547, BF548, BF549, Rev 0.1 or higher
111 2. "Policy" / "Governor" ?
112 ==========================
114 Some CPU frequency scaling-capable processor switch between various
115 frequencies and operating voltages "on the fly" without any kernel or
116 user involvement. This guarantees very fast switching to a frequency
117 which is high enough to serve the user's needs, but low enough to save
124 On these systems, all you can do is select the lower and upper
125 frequency limit as well as whether you want more aggressive
126 power-saving or more instantly available processing power.
132 On all other cpufreq implementations, these boundaries still need to
133 be set. Then, a "governor" must be selected. Such a "governor" decides
134 what speed the processor shall run within the boundaries. One such
135 "governor" is the "userspace" governor. This one allows the user - or
136 a yet-to-implement userspace program - to decide what specific speed
137 the processor shall run at.
140 3. How to change the CPU cpufreq policy and/or speed
141 ====================================================
143 3.1 Preferred Interface: sysfs
144 ------------------------------
146 The preferred interface is located in the sysfs filesystem. If you
147 mounted it at /sys, the cpufreq interface is located in a subdirectory
148 "cpufreq" within the cpu-device directory
149 (e.g. /sys/devices/system/cpu/cpu0/cpufreq/ for the first CPU).
151 cpuinfo_min_freq : this file shows the minimum operating
152 frequency the processor can run at(in kHz)
153 cpuinfo_max_freq : this file shows the maximum operating
154 frequency the processor can run at(in kHz)
155 scaling_driver : this file shows what cpufreq driver is
156 used to set the frequency on this CPU
158 scaling_available_governors : this file shows the CPUfreq governors
159 available in this kernel. You can see the
160 currently activated governor in
162 scaling_governor, and by "echoing" the name of another
163 governor you can change it. Please note
164 that some governors won't load - they only
165 work on some specific architectures or
168 cpuinfo_cur_freq : Current speed of the CPU, in KHz.
170 scaling_available_frequencies : List of available frequencies, in KHz.
173 scaling_max_freq show the current "policy limits" (in
174 kHz). By echoing new values into these
175 files, you can change these limits.
176 NOTE: when setting a policy you need to
177 first set scaling_max_freq, then
180 affected_cpus : List of CPUs that require software coordination
183 related_cpus : List of CPUs that need some sort of frequency
184 coordination, whether software or hardware.
186 scaling_driver : Hardware driver for cpufreq.
188 scaling_cur_freq : Current frequency of the CPU, in KHz.
190 If you have selected the "userspace" governor which allows you to
191 set the CPU operating frequency to a specific value, you can read out
192 the current frequency in
194 scaling_setspeed. By "echoing" a new frequency into this
195 you can change the speed of the CPU,
196 but only within the limits of
197 scaling_min_freq and scaling_max_freq.