我是否正确地认为内核参数' isolcpus'接受物理核心ID?因此,如果我有4个物理内核,并且启用了超线程,这使我总共有8个内核,那么我只允许在isolcpus参数中指定cpu内核1..3(core0适用于OS)?
感谢。
答案 0 :(得分:1)
是开源的。
Documentation/kernel-parameters.txt
isolcpus= [KNL,SMP] Isolate CPUs from the general scheduler.
Format:
<cpu number>,...,<cpu number>
or
<cpu number>-<cpu number>
(must be a positive range in ascending order)
or a mixture
<cpu number>,...,<cpu number>-<cpu number>
This option can be used to specify one or more CPUs
to isolate from the general SMP balancing and scheduling
algorithms. You can move a process onto or off an
"isolated" CPU via the CPU affinity syscalls or cpuset.
<cpu number> begins at 0 and the maximum value is
"number of CPUs in system - 1".
This option is the preferred way to isolate CPUs. The
alternative -- manually setting the CPU mask of all
tasks in the system -- can cause problems and
suboptimal load balancer performance.
如果这还不够,只需搜索isolcplus的来源,然后查看如何使用。