dvfsmgr-*
Dynamic Voltage Frequency Scaling driver
Syntax:
dvfsmgr [vp:i:c:U:D:o:]
Runs on:
QNX OS
Options:
- c cfg_file
- The path to the DVFS configuration file. The default is /etc/system/config/dvfs.conf.
- -Dxxx
- A system on a chip (SoC) specific option. Use -Duse to print available options.
- -i interval
- The CPU accounting interval, in milliseconds (default: 1000ms).
- -o cfg_pwrtable
- The path to the DVFS configuration Power Table file. The default is /etc/system/config/dvfs_pwrtbl.conf.
- -p prio
- The CPU accounting priority (default:51).
- -U uid:gid
- Change user and group ID after setup.
- -v
- Be verbose. Additional v options cause more verbosity.
Description:
The dvfsmgr-* driver manages Dynamic Voltage Frequency Scaling (DVFS) for a system on a chip (Soc). DVFS allows SoCs to run at various power levels based on CPU load and/or temperature. This system-level power management could be beneficial in saving power during low CPU loads and ensuring that the chip’s thermal limits are never reached.
This driver provides some level of power and thermal management from a system level. The driver is responsible for the following tasks:
- monitoring the CPU load (MPU load)
- monitoring the SoC temperature (if possible)
- scaling the voltage and the frequency of MPU, based on the reported CPU load and/or SoC temperature
- providing an API for applications to send commands or read various information
The dvfs_client utility provides a way for you to interact with the DVFS driver.
DVFS configuration file
You need to provide a DVFS configuration file to the driver. This file has the following columns, separated by either spaces or tabs:
- Level number
- The level number (0-based) of each row within the configuration file.
- Up threshold
- The
UP
or higher power-transition threshold. If the CPU load exceeds the value for a given level, a transition occurs (if allowed). - Down threshold
- The
DOWN
or lower power transition threshold. If the CPU load drops below this value for a given level, a transition occurs. - Up temperature threshold
- The temperature (in degrees Celsius) at which a certain power level is disabled and a transition to a lower level occurs (if allowed).
- Down temperature threshold
- The temperature (in degree Celsius) at which a certain power level is reenabled. A transition may or may not occur (if allowed, and depending on CPU load).
#DVFS Config file
# Level UP_threshold DOWN_threshold Up_temperature Down_temperature
0 100 40 80 78
1 80 20 90 88
2 60 0 95 93
A sample configuration file is included with the driver. You can modify this file to meet your specific needs.
Operating modes
The DVFS driver supports the following operating modes, to ensure maximum flexibility:
- Automatic mode
- This is the default mode of the driver. The driver automatically adjusts voltage and frequency,
based on the CPU load and temperature. Multiple clients can obtain the current status of
the driver, which contains information such as load, temperature, mode of operation and
so on. In this mode, clients can't change the power levels, and such requests are
ignored.
This mode, however, allows an application to request a minimum level of operation, below which the driver shouldn't operate (unless forced by high temperatures). The driver is in charge of notifying the clients if any change to their desired setting is made.
- Semi-automatic mode
- Semi-automatic mode can be activated by only one client at any given time.
The driver may be changed to this mode when the appropriate request is made from a client. When a client successfully changes the mode to semi-automatic, it's in charge of requesting power level change, based on the status of the driver. No other client is allowed to change the mode and/or power level of the driver. The driver decreases power levels due only to temperature restrictions.
The controlling client may relinquish control by setting the mode of the driver back to automatic mode. Once the driver is back in automatic mode, any client may change the mode to manual or semi-automatic.
- Manual mode
- Manual mode can be activated by only one client at any given time. This mode is similar to semi-automatic, with the exception that the driver doesn't modify power levels under any circumstances, and the controlling client has full control over the driver.
Reading the driver status
To get the driver's status, read from /dev/dvfs. The DVFS driver returns the status of driver, along with all significant information regarding the driver. Here's an example:
# cat /dev/dvfs
----------------------------
Core Temp = 42
CPU<0> Load = 91
CPU<1> Load = 68
Mode = Auto (0)
----------------------------
# | App | Thermal
----------------------------
0 | - | x
*1 | - | -
2 | - | -
----------------------------
In this example, the temperature of the core is 42°C, CPU loads for cores 0 and 1 are 91% and 68%, and the driver is running in automatic mode. Furthermore, three power levels are supported. Power level 0 (the highest level) is disabled by temperature, and the driver is running at power level 1 (shown with an asterisk).