Documentation_lockup-watchdogs.txt

2024-06-22 07:58

本文主要是介绍Documentation_lockup-watchdogs.txt,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

如果想评论或更新本文的内容,请直接联系原文档的维护者。

如果你使用英文交流有困难的话,也可以向中文版维护者求助。

如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。

中文版维护者: 姚家珺AriosYao   ks666dejia@163.com

中文版翻译者: 姚家珺AriosYao   ks666dejia@163.com

中文版校译者: 姚家珺AriosYao   ks666dejia@163.com

===============================================================

softlockup检测器和hardlockup检测器(又名nmi_watchdog)

===============================================================

The Linux kernel can act as a watchdog to detect both soft and hard
lockups.
Linux内核可以监督检测软、硬死锁现象。

A 'softlockup' is defined as a bug that causes the kernel to loop in
kernel mode for more than 20 seconds (see "Implementation" below for
details), without giving other tasks a chance to run. The current
stack trace is displayed upon detection and, by default, the system
will stay locked up. Alternatively, the kernel can be configured to
panic; a sysctl, "kernel.softlockup_panic", a kernel parameter,
"softlockup_panic" (see "Documentation/kernel-parameters.txt" for
details), and a compile option, "BOOTPARAM_HARDLOCKUP_PANIC", are
provided for this.

“软件死锁”被定义为一个错误,导致核环
20秒以上的内核模式(见下面的“执行”
详情),而不给其他任务运行的机会。依赖系统检测的正确栈跟踪显示
,以及默认情况下的系统
将一直处于死锁。另外,内核可被配置为
“panic”;sysctl命令,"kernel.softlockup_panic",内核参数
“softlockup_panic”(见"Documentation/kernel-parameters.txt"
细节),和编译选项,“bootparam_hardlockup_panic”为此而提供。

A 'hardlockup' is defined as a bug that causes the CPU to loop in
kernel mode for more than 10 seconds (see "Implementation" below for
details), without letting other interrupts have a chance to run.
Similarly to the softlockup case, the current stack trace is displayed
upon detection and the system will stay locked up unless the default
behavior is changed, which can be done through a compile time knob,
"BOOTPARAM_HARDLOCKUP_PANIC", and a kernel parameter, "nmi_watchdog"
(see "Documentation/kernel-parameters.txt" for details).

"硬件死锁"也被定义为一个错误,导致CPU循环
超过10秒(见“实施”下面的内核模式
细节),而不让其他中断运行的机会。
和软件死锁时一样,除非默认操作发生改变,依赖系统检测的正确栈跟踪显示
和系统将保持锁定,改变可以通过指令“BOOTPARAM_HARDLOCKUP_PANIC”,和内核参数,“nmi_watchdog”实现
(详情见"Documentation/kernel-parameters.txt")。

The panic option can be used in combination with panic_timeout (this
timeout is set through the confusingly named "kernel.panic" sysctl),
to cause the system to reboot automatically after a specified amount
of time.

Panic选项可以结合使用panic_timeout(这
个timeout变量是通过设置名为“kernel.panic”的sysctl项),
引起系统重新启动后会自动指定的时间量。

=== Implementation ===
=== 执行 ===

The soft and hard lockup detectors are built on top of the hrtimer and
perf subsystems, respectively. A direct consequence of this is that,
in principle, they should work in any architecture where these
subsystems are present.

软件和硬件死锁检测器建立在hrtimer和perf子系统的顶端,
一个直接后果是,原则上,他们应该能在任何拥有这种子系统的架构上工作
子系统都存在。

A periodic hrtimer runs to generate interrupts and kick the watchdog
task. An NMI perf event is generated every "watchdog_thresh"
(compile-time initialized to 10 and configurable through sysctl of the
same name) seconds to check for hardlockups. If any CPU in the system
does not receive any hrtimer interrupt during that time the
'hardlockup detector' (the handler for the NMI perf event) will
generate a kernel warning or call panic, depending on the
configuration.

一个定期的hrtimer运行会产生中断以及剔除watchdog任务。
NMI效能活动产生每一个“watchdog_thresh”时间变量
(编译时初始化为10个,并通过同名的sysctl项配置)检查硬件死锁。
如果系统中的所有CPU都没有接受到hrtimer中断,那么在这期间,硬件死锁检测器
(NMI效能活动的处理程序)生成一个内核警告或引起Panic,这取决于系统
的配置。

The watchdog task is a high priority kernel thread that updates a
timestamp every time it is scheduled. If that timestamp is not updated
for 2*watchdog_thresh seconds (the softlockup threshold) the
'softlockup detector' (coded inside the hrtimer callback function)
will dump useful debug information to the system log, after which it
will call panic if it was instructed to do so or resume execution of
other kernel code.

watchdog task是一个高优先级的内核线程,每次运行时就会更新时间戳,
如果该时间戳记连续在2* watchdog_thresh(软件死锁阈值),秒内没有被更新
软件死锁检测器(内部编码的的hrtimer回调函数)
将转储到系统日志中,获取有用的调试信息后,它
,将调用Pinic或继续执行其他内核代码。

The period of the hrtimer is 2*watchdog_thresh/5, which means it has
two or three chances to generate an interrupt before the hardlockup
detector kicks in.

hrtimer的期限为2 * watchdog_thresh/ 5,这意味着它有
两个或三个机会,在硬件死锁探测器开始工作之前产生一个中断。

As explained above, a kernel knob is provided that allows
administrators to configure the period of the hrtimer and the perf
event. The right value for a particular environment is a trade-off
between fast response to lockups and detection overhead.

如上所述,kernel knob提供了一个让
管理员配置hrtimer和perf
事件期限的途径。为特定的环境的一个特定的值,应该权衡
快速响应,锁定和检测开销。

 

这篇关于Documentation_lockup-watchdogs.txt的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1083707

相关文章

oracle数据导出txt及导入txt

oracle数据导出txt及导入txt ORACLE数据导出TXT及从TXT导入: 导出到TXT文件: 1、用PL/SQL DEV打开CMD窗口。 2、spool d:/output.txt; 3、set heading off; --去掉表头 4、select * from usergroup; 5、spool off; www.2ct

c++写txt文件

// Txt_Write.cpp : 定义控制台应用程序的入口点。#include "stdafx.h"#include<iostream>#include<fstream>using namespace std;//将int _tmain(int argc, _TCHAR* argv[]){ofstream in;in.open("shuchu.txt",ios::trunc);/

c++ 读取txt文件

1,按行读取 // TEST_Read.cpp : 定义控制台应用程序的入口点。#include "stdafx.h"#include<iostream>#include<string>#include<fstream>//读取文件所需的文件头//以下为读取文件的一种方法:将文件每行内容存储到字符串中,再输出字符串using namespace std;int _tmain(int

ChatTTS增强版V3【已开源】,长文本修复,中英混读,导入音色,批量SRT、TXT

ChatTTS增强版V3来啦!本次更新增加支持导入SRT、导入音色等功能。结合上次大家反馈的问题,修复了长文本、中英混读等问题。 项目已开源(https://github.com/CCmahua/ChatTTS-Enhanced) 项目介绍 V3 ChatTTS增强版V3,长文本修复,中英混读,导入音色,批量SRT、TXT,代码开源_哔哩哔哩_bilibili V2 ChatTTS

关于ROS包中CMakeList.txt中几个常用的命令的作用 ——————(二)

目录 (5)catkin_package() (6)add_library()    (7)add_dependencies( []...) 接(一)关于ROS包中CMakeList.txt中几个常用的命令的作用 ——————(一)_u012057432的博客-CSDN博客,以下是其他相关的配置命令,有些不是必要的,但是却十分常用,但是也是十分重要的。 (5)catkin_packa

关于ROS包中CMakeList.txt中几个常用的命令的作用 ——————(一)

目录 (1)find_package(catkin REQUIRED  COMPONENTS  ...) (2)include_directories()  (3)add_executable(  src1 src2 ...)   (简易写法) (4)target_link_libraries( lib1  lib2 ...) (简易写法,lib是依赖库的路径) 重点的命令总结:

Documentation/input/cd32.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 姚家珺AriosYao   ks666dejia@163.com 中文版翻译者: 姚家珺AriosYao   ks666dejia@163.com 中文版校译者: 姚家珺AriosYao   ks666d

Documentation/timers/hpet.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 姚家珺AriosYao   ks666dejia@163.com 中文版翻译者: 姚家珺AriosYao   ks666dejia@163.com 中文版校译者: 姚家珺AriosYao   ks666d

Documentation/Filesystem_ext3的中文翻译

Linux内核 文档 翻译Filesystem_ext3Chinese translated version of Documentation/Filesystem_ext3 If you have any comment or update to the content, please contact the original document maintainer directly.  Ho

Documentation_scheduler_sched-rt-group.txt

如果想评论或更新本文的内容,请直接联系原文档的维护者。 如果你使用英文交流有困难的话,也可以向中文版维护者求助。 如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。 中文版维护者: 陶莹莉  tyl18768122426@163.com 中文版翻译者:  陶莹莉  tyl18768122426@163.com 中文版校译者:  陶莹莉  tyl18768122426@163.co