On 5/21/21 5:38 PM, teng sterling wrote: > CC siyanteng@xxxxxxxxxxx > > BTW: > > I don't know why, but your email was treated as spam by gmail. I use > gmail email to subscribe to doc-list, so I didn't find it before, > maybe many people are like me. :-) > Oh, that's too bad. Unforunately I don't know this at all. I promise, I have never done anything to annoy gmail. :-) >> @@ -0,0 +1,65 @@ > refer to other Chinese translations, add maintainer information and > tags and original documentation links. > Alright, got it. >> +=============================================================== >> +Softlockup与hardlockup检测机制(又名:nmi_watchdog) >> +=============================================================== > the line is too long,align it with the text > Ok, I will try to fix it in 2nd version. >> +Softlockup是一种在内核持续循使用CPU超过20秒(详见下面“实现”小节) > origindoc: A ‘softlockup’ is defined as a bug that causes the kernel > to loop in kernel mode for more than 20 seconds > > It's not right for you to translate it that way. Although there are > not many cases where the kernel uses the cpu continuously for more > than 20s, it doesn't mean it doesn't exist, let alone conclude that it > will definitely panic. > > btw: > > bug:计算机领域专业术语,bug原意是“臭虫”,现在用来指代计算机上存在的漏洞,原因是系统安全策略上存在的缺陷,有攻击者能够在未授权的情况下访问的危害。 I have to admit that this paragraph is indeed not precise enough. >> +导致其他任务无法得到运行的内核问题。一旦检测到'softlockup'发生,默认 >> +情况下系统会打印当前堆栈跟踪信息并进入锁定状态。也可配置使其在检测到 >> +'softlockup'后进入panic状态;通过sysctl命令设置 >> +“kernel.softlockup_panic”、使用内核启动参数“softlockup_panic”(详见 >> +Documentation/admin-guide/kernel-parameters.rst)以及使能内核编译选项 >> +“BOOTPARAM_SOFTLOCKUP_PANIC”都可实现这种配置。 >> + >> +而'hardlockup'是内核中持续循环超过10秒钟(详见"实现"小节)导致其他中 > maybe 内核态? You are right. "内核态" is more appropriate. >> +断无法运行的问题。与'softlockup'情况类似,除了使用sysctl命令设置 > 不给其他中断运行的机会 != 其他中断无法运行 Thanks for correcting! >> +Hrtimer用于周期性产生中断并唤醒watchdog任务;而NMI perf事件则以 >> +”watchdog_thresh“(编译时默认初始化为10秒,也可通过”watchdog_thresh“这 >> +个sysctl接口来进行配置修改)为间隔周期产生以检测 hardlockups。如果一个 >> +CPU在这个时间段内没有检测到hrtimer中断发生,'hardlockup 检测器'(即 >> +NMI perf事件处理函数)将会视系统配置而选择产生内核告警或者直接panic。 > 内核警告 Ok, got it. >> +如上所述,内核相当于为系统管理员提供了一个可调节hrtimer定时器和perf事件 >> +的周期长短的旋钮。对于特定的场景通过这个旋钮配置一个合理的周期值需要权 >> +衡lockups检测的响应速度和检测的开销。 >> + >> +默认情况下所有在线cpu上都会运行一个watchdog任务。不过在内核配置了 > maybe watchdog线程/进程? > I prefer to choose "线程". I'm grateful to you for verifying my patch word by word, I will try to fix and optimize them in patch v2 later. Thanks, Hailong