我刚刚用新的3.11内核安装了Ubuntu13.10。在3.10中,它有一个不需要痒的特性,我可以在不被本地计时器打断的情况下运行一个进程,而不是以前那样多。我跟踪了这个链接fullgodmode/
我计划在cpu 3上运行我的应用程序,所以我在grub中设置了以下内容:
isolcpus=3 nohz_full=3 rcu_nocbs=3重新启动后,cpu 3上的本地定时器中断似乎确实比其他cpu少得多。
我还跑了:
# for i in `pgrep rcu` ; do taskset -pc 0 $i ; done但是当我开始运行我的应用程序时,本地计时器中断的计数就会跳升。我的应用程序只做了一个无限循环。
int main() {
while (true) {
}
}那我错过了什么?为什么当我运行某些东西时,时间中断会回来?我认为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
---------------------------------------------------------------------------------------- ------------------发布于 2013-11-24 04:14:36
好的,我发现我需要构建自己的内核来打开配置。
https://stackoverflow.com/questions/20133523
复制相似问题