Venkatesh Pallipadi | fe8e288 | 2008-02-14 00:16:13 -0500 | [diff] [blame] | 1 | |
| 2 | |
| 3 | Supporting multiple CPU idle levels in kernel |
| 4 | |
| 5 | cpuidle sysfs |
| 6 | |
| 7 | System global cpuidle related information and tunables are under |
| 8 | /sys/devices/system/cpu/cpuidle |
| 9 | |
| 10 | The current interfaces in this directory has self-explanatory names: |
| 11 | * current_driver |
| 12 | * current_governor_ro |
| 13 | |
| 14 | With cpuidle_sysfs_switch boot option (meant for developer testing) |
| 15 | following objects are visible instead. |
| 16 | * current_driver |
| 17 | * available_governors |
| 18 | * current_governor |
| 19 | In this case users can switch the governor at run time by writing |
| 20 | to current_governor. |
| 21 | |
| 22 | |
| 23 | Per logical CPU specific cpuidle information are under |
| 24 | /sys/devices/system/cpu/cpuX/cpuidle |
| 25 | for each online cpu X |
| 26 | |
| 27 | -------------------------------------------------------------------------------- |
| 28 | # ls -lR /sys/devices/system/cpu/cpu0/cpuidle/ |
| 29 | /sys/devices/system/cpu/cpu0/cpuidle/: |
| 30 | total 0 |
| 31 | drwxr-xr-x 2 root root 0 Feb 8 10:42 state0 |
| 32 | drwxr-xr-x 2 root root 0 Feb 8 10:42 state1 |
| 33 | drwxr-xr-x 2 root root 0 Feb 8 10:42 state2 |
| 34 | drwxr-xr-x 2 root root 0 Feb 8 10:42 state3 |
| 35 | |
| 36 | /sys/devices/system/cpu/cpu0/cpuidle/state0: |
| 37 | total 0 |
| 38 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc |
ShuoX Liu | 3a53396 | 2012-03-28 15:19:11 -0700 | [diff] [blame] | 39 | -rw-r--r-- 1 root root 4096 Feb 8 10:42 disable |
Venkatesh Pallipadi | fe8e288 | 2008-02-14 00:16:13 -0500 | [diff] [blame] | 40 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency |
| 41 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name |
| 42 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power |
| 43 | -r--r--r-- 1 root root 4096 Feb 8 10:42 time |
| 44 | -r--r--r-- 1 root root 4096 Feb 8 10:42 usage |
| 45 | |
| 46 | /sys/devices/system/cpu/cpu0/cpuidle/state1: |
| 47 | total 0 |
| 48 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc |
ShuoX Liu | 3a53396 | 2012-03-28 15:19:11 -0700 | [diff] [blame] | 49 | -rw-r--r-- 1 root root 4096 Feb 8 10:42 disable |
Venkatesh Pallipadi | fe8e288 | 2008-02-14 00:16:13 -0500 | [diff] [blame] | 50 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency |
| 51 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name |
| 52 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power |
| 53 | -r--r--r-- 1 root root 4096 Feb 8 10:42 time |
| 54 | -r--r--r-- 1 root root 4096 Feb 8 10:42 usage |
| 55 | |
| 56 | /sys/devices/system/cpu/cpu0/cpuidle/state2: |
| 57 | total 0 |
| 58 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc |
ShuoX Liu | 3a53396 | 2012-03-28 15:19:11 -0700 | [diff] [blame] | 59 | -rw-r--r-- 1 root root 4096 Feb 8 10:42 disable |
Venkatesh Pallipadi | fe8e288 | 2008-02-14 00:16:13 -0500 | [diff] [blame] | 60 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency |
| 61 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name |
| 62 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power |
| 63 | -r--r--r-- 1 root root 4096 Feb 8 10:42 time |
| 64 | -r--r--r-- 1 root root 4096 Feb 8 10:42 usage |
| 65 | |
| 66 | /sys/devices/system/cpu/cpu0/cpuidle/state3: |
| 67 | total 0 |
| 68 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc |
ShuoX Liu | 3a53396 | 2012-03-28 15:19:11 -0700 | [diff] [blame] | 69 | -rw-r--r-- 1 root root 4096 Feb 8 10:42 disable |
Venkatesh Pallipadi | fe8e288 | 2008-02-14 00:16:13 -0500 | [diff] [blame] | 70 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency |
| 71 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name |
| 72 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power |
| 73 | -r--r--r-- 1 root root 4096 Feb 8 10:42 time |
| 74 | -r--r--r-- 1 root root 4096 Feb 8 10:42 usage |
| 75 | -------------------------------------------------------------------------------- |
| 76 | |
| 77 | |
| 78 | * desc : Small description about the idle state (string) |
Carsten Emde | 62d6ae8 | 2012-07-19 20:34:10 +0000 | [diff] [blame] | 79 | * disable : Option to disable this idle state (bool) -> see note below |
Venkatesh Pallipadi | fe8e288 | 2008-02-14 00:16:13 -0500 | [diff] [blame] | 80 | * latency : Latency to exit out of this idle state (in microseconds) |
| 81 | * name : Name of the idle state (string) |
| 82 | * power : Power consumed while in this idle state (in milliwatts) |
| 83 | * time : Total time spent in this idle state (in microseconds) |
| 84 | * usage : Number of times this state was entered (count) |
Carsten Emde | 62d6ae8 | 2012-07-19 20:34:10 +0000 | [diff] [blame] | 85 | |
| 86 | Note: |
| 87 | The behavior and the effect of the disable variable depends on the |
| 88 | implementation of a particular governor. In the ladder governor, for |
| 89 | example, it is not coherent, i.e. if one is disabling a light state, |
| 90 | then all deeper states are disabled as well, but the disable variable |
| 91 | does not reflect it. Likewise, if one enables a deep state but a lighter |
| 92 | state still is disabled, then this has no effect. |