[知其然不知其所以然-29] Keep system as idle as possible
2016-06-23 17:28
429 查看
Previously someone reported to me that, his system can not stay in low power state for long time,
thus woken up from S0ix.
According to reporter, most of the wake up which break S0ix on his platform
are triggered by timer interrupt, and based on the output
of /proc/timer_list, the most active timers are illustrated below as:
tick_sched_timer
watchdog_timer_fn
several other hrtimer_wakeup by applications
So here's my ponit of view on reducing such timer interrupts:
1. tick_sched_timer
Although the system is config with CONFIG_NOHZ,
which means if the CPU is in idle then there would be no
tick triggered. But a more complete solution is always set
CONFIG_NO_HZ_FULL, which means that, besides cpu idle,
if there is only one task running on the CPU, there would be
no tick triggered, thus trigger defered softirqd/kevend, thus make
the cpu less likely to be in idle, so better set CONFIG_NO_HZ_FULL and
CONFIG_NO_HZ_FULL_ALL=y
2.watchdog_timer_fn
This one is to track whether there is deadlock on single CPU,
but in our case I don't think we need to enable softlockup/nmi detector
so better disable this watchdog by:
echo 0 > /proc/sys/kernel/watchdog_thresh
3.hrtimer_wakeup
This one is usually set up by user mode applications, such as
nanosleep, select, etc, according to OH's log,
we might need to kill or stop the following services:
avahi-daemon, tcf-agent, rpcbind,connmand
But a more straightfoward way is to boot with a mininmal
system, and see what's the status, for example, how about booting up
with init=/bin/bash?
thus woken up from S0ix.
According to reporter, most of the wake up which break S0ix on his platform
are triggered by timer interrupt, and based on the output
of /proc/timer_list, the most active timers are illustrated below as:
tick_sched_timer
watchdog_timer_fn
several other hrtimer_wakeup by applications
So here's my ponit of view on reducing such timer interrupts:
1. tick_sched_timer
Although the system is config with CONFIG_NOHZ,
which means if the CPU is in idle then there would be no
tick triggered. But a more complete solution is always set
CONFIG_NO_HZ_FULL, which means that, besides cpu idle,
if there is only one task running on the CPU, there would be
no tick triggered, thus trigger defered softirqd/kevend, thus make
the cpu less likely to be in idle, so better set CONFIG_NO_HZ_FULL and
CONFIG_NO_HZ_FULL_ALL=y
2.watchdog_timer_fn
This one is to track whether there is deadlock on single CPU,
but in our case I don't think we need to enable softlockup/nmi detector
so better disable this watchdog by:
echo 0 > /proc/sys/kernel/watchdog_thresh
3.hrtimer_wakeup
This one is usually set up by user mode applications, such as
nanosleep, select, etc, according to OH's log,
we might need to kill or stop the following services:
avahi-daemon, tcf-agent, rpcbind,connmand
But a more straightfoward way is to boot with a mininmal
system, and see what's the status, for example, how about booting up
with init=/bin/bash?
相关文章推荐
- Android下EditText 添加字体下划线
- #117 – Registering a Dependency Property(注册一个依赖属性)
- 关于OPENGL 圆圈计算弧度的问题 (R*cos(PI * 2 / n*i), R* sin(PI * 2 / n*i));
- 对NSRunLoop的一点认识总结
- Junit实现接口类测试
- js toLocaleString() 方法-----前端使得数字有千位分隔符-三位一个逗号间隔。
- Oracle 快照初次使用
- android开源图表库MPAndroidChart
- java处理日期工具类(一)
- 所谓瓶颈
- 个人理解JAVA反射
- WebRTC源代码探索之旅——多线程篇-5.1
- leetcode single number I II III [python]
- 如何创建一个用户看不到的窗口。
- 验证码(公共全自动程序)定义
- Golang中defer、return、返回值之间执行顺序的坑
- iOS开发大神必备的Xcode插件
- Tomcat源码分析
- APK 与 Android Native Service 通信
- PLC中的SMB定义