mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 04:55:16 +07:00
3a53396b03
Some C states of new CPU might be not good. One reason is BIOS might configure them incorrectly. To help developers root cause it quickly, the patch adds a new sysfs entry, so developers could disable specific C state manually. In addition, C state might have much impact on performance tuning, as it takes much time to enter/exit C states, which might delay interrupt processing. With the new debug option, developers could check if a deep C state could impact performance and how much impact it could cause. Also add this option in Documentation/cpuidle/sysfs.txt. [akpm@linux-foundation.org: check kstrtol return value] Signed-off-by: ShuoX Liu <shuox.liu@intel.com> Reviewed-by: Yanmin Zhang <yanmin_zhang@intel.com> Reviewed-and-Tested-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
85 lines
3.0 KiB
Plaintext
85 lines
3.0 KiB
Plaintext
|
|
|
|
Supporting multiple CPU idle levels in kernel
|
|
|
|
cpuidle sysfs
|
|
|
|
System global cpuidle related information and tunables are under
|
|
/sys/devices/system/cpu/cpuidle
|
|
|
|
The current interfaces in this directory has self-explanatory names:
|
|
* current_driver
|
|
* current_governor_ro
|
|
|
|
With cpuidle_sysfs_switch boot option (meant for developer testing)
|
|
following objects are visible instead.
|
|
* current_driver
|
|
* available_governors
|
|
* current_governor
|
|
In this case users can switch the governor at run time by writing
|
|
to current_governor.
|
|
|
|
|
|
Per logical CPU specific cpuidle information are under
|
|
/sys/devices/system/cpu/cpuX/cpuidle
|
|
for each online cpu X
|
|
|
|
--------------------------------------------------------------------------------
|
|
# ls -lR /sys/devices/system/cpu/cpu0/cpuidle/
|
|
/sys/devices/system/cpu/cpu0/cpuidle/:
|
|
total 0
|
|
drwxr-xr-x 2 root root 0 Feb 8 10:42 state0
|
|
drwxr-xr-x 2 root root 0 Feb 8 10:42 state1
|
|
drwxr-xr-x 2 root root 0 Feb 8 10:42 state2
|
|
drwxr-xr-x 2 root root 0 Feb 8 10:42 state3
|
|
|
|
/sys/devices/system/cpu/cpu0/cpuidle/state0:
|
|
total 0
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 desc
|
|
-rw-r--r-- 1 root root 4096 Feb 8 10:42 disable
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 latency
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 name
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 power
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 time
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 usage
|
|
|
|
/sys/devices/system/cpu/cpu0/cpuidle/state1:
|
|
total 0
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 desc
|
|
-rw-r--r-- 1 root root 4096 Feb 8 10:42 disable
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 latency
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 name
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 power
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 time
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 usage
|
|
|
|
/sys/devices/system/cpu/cpu0/cpuidle/state2:
|
|
total 0
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 desc
|
|
-rw-r--r-- 1 root root 4096 Feb 8 10:42 disable
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 latency
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 name
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 power
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 time
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 usage
|
|
|
|
/sys/devices/system/cpu/cpu0/cpuidle/state3:
|
|
total 0
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 desc
|
|
-rw-r--r-- 1 root root 4096 Feb 8 10:42 disable
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 latency
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 name
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 power
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 time
|
|
-r--r--r-- 1 root root 4096 Feb 8 10:42 usage
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
* desc : Small description about the idle state (string)
|
|
* disable : Option to disable this idle state (bool)
|
|
* latency : Latency to exit out of this idle state (in microseconds)
|
|
* name : Name of the idle state (string)
|
|
* power : Power consumed while in this idle state (in milliwatts)
|
|
* time : Total time spent in this idle state (in microseconds)
|
|
* usage : Number of times this state was entered (count)
|