完全消除了现代Linux> = 5.0中的计时器滴答 [英] Completely eliminating the timer tick in modern Linux >=5.0

查看:89
本文介绍了完全消除了现代Linux> = 5.0中的计时器滴答的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试完全消除安静计算机上一组内核上的计时器中断.这些是这些内核定期处理的唯一中断.我已经用 isolcpu 了它们,并用 CONFIG_NO_HZ_FULL 构建了一个内核,实际上,现在它们仅每秒钟接收一次定时器中断.是否可以删除此剩余的1Hz计时器中断?

I'm trying to completely eliminate timer interrupts on a set of cores on a quiet machine. These are the only interrupts regularly processed by these cores. I've isolcpu'd them, and built a kernel with CONFIG_NO_HZ_FULL, and indeed now they only receive timer interrupts around once a second. Is it possible to remove this residual 1Hz timer interrupt?

内核文档表明,有时需要在一点:

This kernel doc suggests that an occasional tick was necessary at some point:

某些流程处理操作仍然需要偶尔计划时钟滴答声.这些操作包括计算CPU负载,保持预定平均值,计算CFS实体vruntime,计算avenrun并执行负载平衡.他们是当前由调度时钟滴答声每秒容纳或者.正在进行的工作将消除对这些工作的需要不频繁的计划时钟滴答声.

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.

内核补丁,删除1 Hz刻度代码,"建议在更高版本的内核中将其删除:

And this kernel patch, "Remove the 1 Hz tick code," suggests that it was removed in a later version of the kernel:

现在将1Hz滴答声卸载到工作队列中,我们可以安全地删除用于本地处理的残余代码.

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内核,希望该残留的滴答声将被删除,但它仍然存在.

I've built the 5.3.0 kernel hoping that this residual tick would be removed, but it's still present.

是否需要设置其他启动参数?在最新版本的内核中是否确实删除了剩余计时器滴答声?(该问题具有一些相关信息)

Are there additional boot parameters I need to set? Is the residual timer tick really removed in the latest versions of the kernel? (this question has some relevant information)

推荐答案

无法从所有cpus中完全删除1HZ刻度,否则我们将无法保留任何统计信息.相反,发生的事情是它现在正在工作队列中运行,并且您现在可以配置一个 housekeeping CPU,它将处理所有全局工作队列任务.有关详细信息,请参见此提交.

The 1HZ tick can't be removed completely from all cpus otherwise we won't be able to keep any statistics. Instead what happens is that it is now run through a workqueue and you can now configure a housekeeping CPU that will handle all global workqueue tasks. See this commit for details.

还建议将nohz_full命令行参数与cpusets一起使用来管理隔离CPU的集合.您仍然需要让其中一个(默认情况下为引导CPU)作为内部管理CPU.

It is also recommended to use nohz_full command-line parameter along with cpusets to manage the set of isolated cpus. You still need to let one of them (boot CPU by default) to be the housekeeping cpu.

这篇关于完全消除了现代Linux> = 5.0中的计时器滴答的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆