假设我有 4 个物理核心(索引 0-3),并且我将核心 1-3 专用于用户应用程序的屏蔽,并尝试将所有系统线程引导到核心 0。我正在遵循答案这里并使用cset
:
# /usr/local/bin/cset shield --cpu 1-3
cset: --> activating shielding:
cset: moving 145 tasks from root into system cpuset...
[==================================================]%
cset: "system" cpuset of CPUSPEC(0) with 145 tasks running
cset: "user" cpuset of CPUSPEC(1-3) with 0 tasks running
但是,我似乎无法将所有内核线程移至核心 0:
# cset shield --kthread on
cset shield --kthread on
cset: --> activating kthread shielding
cset: kthread shield activated, moving 175 tasks into system cpuset...
[==================================================]%
cset: **> 30 tasks are not movable, impossible to move
cset: done
这Ubuntu 手册页说该--kthread
标志仅适用于不受约束的内核线程:
-k on|off, --kthread=on|off
shield from unbound interrupt threads as well
所以我想我需要移动边界内核线程也远离核心 1-3。我怎么做? (最好在 CentOS 上。)