Min*_*ing 12 linux latency timer interrupt linux-kernel
我刚刚用新的3.11内核安装了Ubuntu 13.10.在3.10中,它具有无滴漏功能,我可以在不受本地定时器中断的情况下运行进程,而不像以前那么多.我关注此链接http://www.breakage.org/2013/11/nohz_fullgodmode/
我计划在cpu 3上运行我的应用程序,所以我在grub中设置以下内容:
isolcpus=3 nohz_full=3 rcu_nocbs=3
Run Code Online (Sandbox Code Playgroud)
重新启动后,似乎cpu 3上的本地定时器中断确实比其他cpu要少很多.
我也跑了:
# for i in `pgrep rcu` ; do taskset -pc 0 $i ; done
Run Code Online (Sandbox Code Playgroud)
但是当我开始运行我的应用程序时,本地计时器中断的计数跳了起来.我的应用程序只做无限循环.
int main() {
while (true) {
}
}
Run Code Online (Sandbox Code Playgroud)
那我错过了什么?当我运行时,为什么时间中断会回来?我认为nohz_full意味着当只有一个进程在运行时,它将停止中断.
以下是/ proc/sched_debug的输出,当我没有运行应用程序时,显然在该cpu上没有其他进程.那我错过了什么?
cpu#3, 2492.071 MHz
.nr_running : 0
.load : 0
.nr_switches : 45818
.nr_load_updates : 11165
.nr_uninterruptible : -1
.next_balance : 4295.674289
.curr->pid : 0
.clock : 3127610.519188
.cpu_load[0] : 0
.cpu_load[1] : 0
.cpu_load[2] : 0
.cpu_load[3] : 0
.cpu_load[4] : 0
.yld_count : 0
.sched_count : 47377
.sched_goidle : 3956
.avg_idle : 1000000
.ttwu_count : 29329
.ttwu_local : 26078
cfs_rq[3]:/
.exec_clock : 15750.800052
.MIN_vruntime : 0.000001
.min_vruntime : 15699.782432
.max_vruntime : 0.000001
.spread : 0.000000
.spread0 : -247950.011716
.nr_spread_over : 0
.nr_running : 0
.load : 0
.runnable_load_avg : 0
.blocked_load_avg : 0
.tg_load_contrib : 0
.tg_runnable_contrib : 0
.tg_load_avg : 602
.tg->runnable_avg : 592
.avg->runnable_avg_sum : 0
.avg->runnable_avg_period : 47077
rt_rq[3]:/
.rt_nr_running : 0
.rt_throttled : 0
.rt_time : 0.000000
.rt_runtime : 950.000000
runnable tasks:
task PID tree-key switches prio exec-runtime sum- exec sum-sleep
---------------------------------------------------------------------------------------- ------------------
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5235 次 |
最近记录: |