There are two main approaches to performing CPU frequency scaling—by the kernel
itself (CPUfreq infrastructure with in-kernel governors) or by a userspace application.
The in-kernel governors are policy governors that can change the CPU frequency based
on different criteria (a sort of pre-congured power schemes for the CPU). The following
governors are available with the CPUfreq subsystem:
Performance Governor
The CPU frequency is statically set to the highest possible for maximum perfor-
mance. Consequently, saving power is not the focus of this governor.
Powersave Governor
The CPU frequency is statically set to the lowest possible. This can have severe
impact on the performance, as the system will never rise above this frequency no
matter how busy the processors are.
On-demand Governor
The kernel implementation of a dynamic CPU frequency policy: The governor
monitors the processor utilization. As soon as it exceeds a certain threshold, the
governor will set the frequency to the highest available. If the utilization is less
than the threshold, the next lowest frequency is used. If the system continues to be
underutilized, the frequency is again reduced until the lowest available frequency
is set.
Conservative Governor
Similar to the on-demand implementation, this governor also dynamically adjusts
frequencies based on processor utilization, except that it allows for a more gradual
increase in power. If processor utilization exceeds a certain threshold, the governor
does not immediately switch to the highest available frequency (as the on-demand
governor does), but only to next higher frequency available.
The relevant les for the kernel governors are located at /sys/devices/system/
cpu/cpu*/cpufreq/. If your machine has more than one CPU, /sys/devices/
system/cpu/ will hold a subdirectory for each processor: cpu0, cpu1, etc. If your
system currently uses the on-demand or conservative governor, you will see a separate
subdirectory for those governors in cpufreq, containing the parameters for the gov-
ernors.
506 Reference