0 full gc时cpu idle_【cpuidle】计算每个cpu进入idle的时间

参考内核文档

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 residency

-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 residency

-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 residency

-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 residency

-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) -> see note below

* latency : Latency to exit out of this idle state (in microseconds)

* residency : Time after which a state becomes more effecient than any

shallower 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)

Note:

The behavior and the effect of the disable variable depends on the

implementation of a particular governor. In the ladder governor, for

example, it is not coherent, i.e. if one is disabling a light state,

then all deeper states are disabled as well, but the disable variable

does not reflect it. Likewise, if one enables a deep state but a lighter

state still is disabled, then this has no effect.

其中time显示了每个idle阶段的时间长短。

前后两次idle/state*/time的时间即是进入idle的时间。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值