Skip to main content
CPU idle power management, or idle power management, keeps the CPU cores in the appropriate sleep state for efficient use of energy when the device is idle.

CPU sleep states

A CPU core supports several sleep states. Each sleep state has associated entry and exit latencies and different levels of power consumption. The selection of a core’s sleep state depends on how soon that core is required again for another execution. A C-state number represents each CPU sleep state. Two key parameters are associated with each C-state:
  • Power saving: The power saving of the CPU increases as you select higher C-states, but it results in increased wake-up latency.
  • Wake-up latency: This is the time taken to transition a CPU core from sleep state to running state.
For example, a deeper sleep state (C4) has higher wake-up latency and lower power consumption as shown in the following figure. Tradeoff between power and latency Figure : Tradeoff between power and latency
Use the following command to view the latencies of CPU sleep state:
cat /sys/devices/system/cpu/cpu<X>/cpuidle/state<Y>/latency
Note Here, <X> represents the core ID, which varies from 0 to 7, and <Y> is the index of the Linux power state (0, 1, 2). The following table defines the Linux power states. You can study and configure sleep states to tune applications for balanced power and performance. The following table lists the supported CPU sleep states and their associated C-state numbers: Note The CPU sleep states are enabled by default.
Table : Supported core power states for QCS6490/QCS5430
CPU sleep stateDescriptionLinux power state
C1
  • CPU core clock domain off
  • Power domains VDD_APC0/ VDD_APC1 on
  • Generic interrupt controller (GIC) clock on
State0 (S0)
C3
  • CPU core clock domain off
  • Core power collapse with L1 and L2 cache flushed
  • Power domains VDD_APC0/ VDD_APC1 on
State1 (S1)
C4
  • C3 + PLL off for the Silver cluster
  • C3+ PLL power domains off for the Gold and the Prime clusters
State2 (S2)

Enable and disable low power management state

The following table lists how to configure CPU sleep states: Note If you change the configuration of a sleep state, you should check the power impact on the device. Table : Commands to enable/disable CPU power states
CPU sleep stateDescriptionLinux power state
S0Disableecho 0 > /sys/devices/system/cpu/cpuX/cpuidle/state0/disable
Enableecho 1 > /sys/devices/system/cpu/cpuX/cpuidle/state0/disable
S1Disableecho 0 > /sys/devices/system/cpu/cpuX/cpuidle/state1/disable
Enableecho 1 > /sys/devices/system/cpu/cpuX/cpuidle/state1/disable
S2Disableecho 0 > /sys/devices/system/cpu/cpuX/cpuidle/state2/disable
Enableecho 1 > /sys/devices/system/cpu/cpuX/cpuidle/state2/disable
Note <X> denotes the core ID, which can vary from 0 to 11.

Verify CPU idle statistics

To check the statistics of CPU core sleep states, run the following command:
cat /sys/devices/system/cpu/cpu<X>/cpuidle/state<Y>/usage
Here, <X> is the core ID, which varies from 0 to 7, and <Y> is the index of the Linux power state (0, 1, and 2). The following is an example of the output: cd /sys/devices/system/cpu grep -r “” cpu*/cpuidle/*/usage cpu0/cpuidle/state0/usage:97681 cpu0/cpuidle/state1/usage:95 cpu1/cpuidle/state0/usage:180055 cpu1/cpuidle/state1/usage:59 Note The usage count represents the number of times cpu<X> enters a Linux power state.

Next steps