- 论坛徽章:
- 0
|
回复 3# linuxfellow
谢谢~我主要是想了解Linux nmi_watchdog的具体工作机制是什么,尤其是,NMI是如何触发的
Documentation/nmi_watchdog.txt我看过,令我很疑惑,因为它还是没说NMI到底是怎么被触发的……
"Be aware that when using local APIC, the frequency of NMI interrupts it generates, depends on the system load. The local APIC NMI watchdog, lacking a better source, uses the "cycles unhalted" event. "
根据系统负载?"cycles unhalted"也说得很抽象……《ULK3》倒是说得很清楚,但很矛盾
"but if your system locks up on anything but the "hlt" processor instruction, the watchdog will trigger very soon as the "cycles unhalted" event will happen every clock tick."
"If it locks up on "hlt", then you are out of luck -- the event will not happen at all and the watchdog won't trigger. "
为何执行了hlt指令,watchdog就不会触发了?我查了《Intel Manual, 2A》,对hlt的描述是这样的:
"Stops instruction execution and places the processor in a HALT state. An enabled interrupt (including NMI and SMI), a debug exception, the BINIT# signal, the INIT# signal, or the RESET# signal will resume execution."
显然,即使CPU执行了hlt,也能被NMI唤醒。我认为这里的关键是文档中所说的"cycles unhalted"具体是指什么。
请指教。
P.S. 小弟初来乍到chinaunix,这论坛的验证问答也太扯淡了吧…… |
|