【发布时间】:2016-10-17 08:34:39
【问题描述】:
我在我的 linux 3.10.0-327.el7.x86_64 中有 grub set isolcpus=2 ,我想要的是 避免内核调度器不将任务调度到 cpu core 2 ,那么我有
perf record -e sched:sched_switch -C 2
查看核心 2 中发生了什么,然后运行我的 ap(which CPU_SET(2) , 和以下命令:
perf report --show-total-period -i perf.data
得到结果:
48.85% 85 swapper [kernel.kallsyms] [k] __schedule
18.97% 33 kworker/u384:0 [kernel.kallsyms] [k] __schedule
11.49% 20 :4594 [kernel.kallsyms] [k] __schedule
11.49% 20 smartd [kernel.kallsyms] [k] __schedule
4.60% 8 watchdog/2 [kernel.kallsyms] [k] __schedule
3.45% 6 sshd [kernel.kallsyms] [k] __schedule
1.15% 2 kworker/2:2 [kernel.kallsyms] [k] __schedule
我知道 kworker/2 , watchdog/2 是管家任务,线程 id 4594 是我用 CPU_SET(2) 运行我的应用程序,但我真的想避免 sshd , smartd 守护进程在核心 2 中运行,有没有我可以通过配置文件或方法告诉内核避免在核心 2 中运行守护进程?!
编辑:
编辑 grub 后,应该有 update-grub 命令然后重新启动, 我将尝试弄清楚如何更新-grub,我认为 grub config isolcpus=2 但尚未启用,我将在使 isolcpus=2 工作后更新结果。
【问题讨论】:
标签: linux linux-kernel