我试图在一台安静的机器上完全消除一组内核上的定时器中断。这些是这些内核定期处理的唯一中断。我已经 isolcpu
'd 他们,并用 CONFIG_NO_HZ_FULL
构建了一个内核,实际上现在他们每秒只收到一次定时器中断。 是否可以删除这个残留的 1Hz 定时器中断?
此 kernel doc表明在某些时候需要偶尔打勾:
Some process-handling operations still require the occasional scheduling-clock tick. These operations include calculating CPU load, maintaining sched average, computing CFS entity vruntime, computing avenrun, and carrying out load balancing. They are currently accommodated by scheduling-clock tick every second or so. On-going work will eliminate the need even for these infrequent scheduling-clock ticks.
还有这个 kernel patch , "Remove the 1 Hz tick code,"表明它在内核的更高版本中被删除:
Now that the 1Hz tick is offloaded to workqueues, we can safely remove the residual code that used to handle it locally.
我已经构建了 5.3.0 内核,希望可以删除这个残留的滴答声,但它仍然存在。
我需要设置额外的引导参数吗?最新版本的内核中真的去掉了residual timer tick吗? ( this question 有一些相关资料)
最佳答案
不能从所有 CPU 中完全删除 1HZ 刻度,否则我们将无法保留任何统计信息。相反,它现在通过工作队列运行,您现在可以配置 housekeeping
将处理所有全局工作队列任务的 CPU。看到这个 commit详情。
还建议使用 nohz_full 命令行参数和 cpusets 来管理一组隔离的 cpu。您仍然需要让其中之一(默认情况下引导 CPU)成为内务 CPU。
关于linux - 完全消除现代 Linux >=5.0 中的计时器滴答,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60322119/