The @stk_name@ supports DVFS (dynamic voltage and frequency scaling, by default the governor ''ondemand'' is set.
Governors are power schemes for the CPU. Only one may be active at a time.
^ Governor ^ description ^
| performance | Run the CPU at the maximum frequency. |
| powersave | Run the CPU at the minimum frequency. |
| userspace | Run the CPU at user specified frequencies. |
| ondemand | Scales the frequency dynamically according to current load. Jumps to the highest frequency and then possibly back off as the idle time increases. |
| conservative | Scales the frequency dynamically according to current load. Scales the frequency more gradually than ondemand. |
| schedutil | Scheduler-driven CPU frequency selection |
You can change the actual governor with the following command:
cpufreq-set -g
(e.g. cpufreq-set -g performance)
==== Disable CPU Core temporarily ====
At runtime it is possible to disable multiple CPU cores via the Linux sysfs. On a system that has four CPU cores, the maximum of three cores can be disabled.
To disable the a CPU core value ''0'' must be written to the CPU core specific file ''/sys/devices/system/cpu/cpu/online'' where is the number of the Core, the counting starts at zero.
\\
e.g. disable CPU core 4:
echo 0 > /sys/devices/system/cpu/cpu3/online
To check which CPU core(s) are currently enabled the following command can be used:
grep "processor" /proc/cpuinfo
The CPU core can be enabled again by writing the value ''1'' to ''/sys/devices/system/cpu/cpu/online''.\\
\\
e.g. enable CPU core 4:
echo 1 > /sys/devices/system/cpu/cpu3/online
==== Set ammount of CPU Cores permanently ====
It is possible to limit the maximium amount of cores with the the ''maxcpus='' parameter in the kernel command line. To add the new parameter a new U-boot variable ''addcpu'' has to be created.
setenv addcpu maxcpus=${cpu_num}
The amount of cores is set by the ''cpu_num'' variable, for example if cpu num is set to ''2'' only two cores will be started.
setenv cpu_num 2