Howto change CPU DVFS settings

From XApple
Jump to: navigation, search

Description

The dynamic CPU voltage and frequency control methodology is pretty common in SoC. The DVFS (Dynamic Voltage & Frequency Scaling) is to manage the table of CPU voltage and frequency values to fulfill different requirements in different use cases. This is a proper approach to balance the system performance and power consumption. This is especially important for the mobile devices which are equipped restricted capacity of battery cells.

According to CPU frequency and voltage scaling source code in Actions-Semi's Linux kernel, several kinds of CPUfreq governors are also included. For example, in S500 you can get a list of available governors and the supported frequencies as below.

#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative ondemand userspace powersave interactive performance

#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
408000 720000 900000 1104000 1308000

Howto change the setting of CPU frequency

Based on the available CPU frequencies and governors, you can set the CPU governors, minimum, maximum or fixed frequency easily by commands. Here are some examples on the S500 platform.

#echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

#echo 1104000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

#echo 900000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

If you just want to check the current settings of CPU frequency and governors, you can check by the following commands. For example:

#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
1104000

#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
1308000

#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1104000

#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance

Reference

1、https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt

Personal tools
Namespaces

Variants
Actions
Navigation
Tools