Dynamic Voltage Frequency Scaling driver
dvfsmgr [vwp:i:c:]
QNX Neutrino
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:
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:
The DVFS driver parses the configuration file on startup and extracts all relevant information from it. A line starting with ‘#’ is considered a comment. The driver reports any errors encountered while parsing through this file. A DVFS configuration file with 3 levels of transition is shown below:
#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:
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.
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.
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).