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
27 2. "Policy" / "Governor"?
31 3. How to change the CPU cpufreq policy and/or speed
32 3.1 Preferred interface: sysfs
33 3.2 Deprecated interfaces
37 1. Supported Architectures and Processors
38 =========================================
43 The following ARM processors are supported by cpufreq:
54 The following processors for the x86 architecture are supported by cpufreq:
56 AMD Elan - SC400, SC410
64 Intel mobile PIII and Intel mobile PIII-M on certain chipsets
65 Intel Pentium 4, Intel Xeon
66 Intel Pentium M (Centrino)
67 National Semiconductors Geode GX
71 various processors on some ACPI 2.0-compatible systems [*]
73 [*] Only if "ACPI Processor Performance States" are available
74 to the ACPI<->BIOS interface.
80 The following processors for the sparc64 architecture are supported by
89 Several "PowerBook" and "iBook2" notebooks are supported.
95 The following SuperH processors are supported by cpufreq:
101 2. "Policy" / "Governor" ?
102 ==========================
104 Some CPU frequency scaling-capable processor switch between various
105 frequencies and operating voltages "on the fly" without any kernel or
106 user involvement. This guarantees very fast switching to a frequency
107 which is high enough to serve the user's needs, but low enough to save
114 On these systems, all you can do is select the lower and upper
115 frequency limit as well as whether you want more aggressive
116 power-saving or more instantly available processing power.
122 On all other cpufreq implementations, these boundaries still need to
123 be set. Then, a "governor" must be selected. Such a "governor" decides
124 what speed the processor shall run within the boundaries. One such
125 "governor" is the "userspace" governor. This one allows the user - or
126 a yet-to-implement userspace program - to decide what specific speed
127 the processor shall run at.
130 3. How to change the CPU cpufreq policy and/or speed
131 ====================================================
133 3.1 Preferred Interface: sysfs
134 ------------------------------
136 The preferred interface is located in the sysfs filesystem. If you
137 mounted 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).
141 cpuinfo_min_freq : this file shows the minimum operating
142 frequency the processor can run at(in kHz)
143 cpuinfo_max_freq : this file shows the maximum operating
144 frequency the processor can run at(in kHz)
145 scaling_driver : this file shows what cpufreq driver is
146 used to set the frequency on this CPU
148 scaling_available_governors : this file shows the CPUfreq governors
149 available in this kernel. You can see the
150 currently activated governor in
152 scaling_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
158 scaling_max_freq show the current "policy limits" (in
159 kHz). By echoing new values into these
160 files, you can change these limits.
161 NOTE: when setting a policy you need to
162 first set scaling_max_freq, then
166 If you have selected the "userspace" governor which allows you to
167 set the CPU operating frequency to a specific value, you can read out
168 the current frequency in
170 scaling_setspeed. By "echoing" a new frequency into this
171 you can change the speed of the CPU,
172 but only within the limits of
173 scaling_min_freq and scaling_max_freq.
176 3.2 Deprecated Interfaces
177 -------------------------
179 Depending on your kernel configuration, you might find the following
180 cpufreq-related files:
182 /proc/sys/cpu/*/speed
183 /proc/sys/cpu/*/speed-min
184 /proc/sys/cpu/*/speed-max
186 These are files for deprecated interfaces to cpufreq, which offer far
187 less functionality. Because of this, these interfaces aren't described