€•ÈpŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ0/translations/zh_CN/admin-guide/lockup-watchdogs”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/zh_TW/admin-guide/lockup-watchdogs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/it_IT/admin-guide/lockup-watchdogs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/ja_JP/admin-guide/lockup-watchdogs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/ko_KR/admin-guide/lockup-watchdogs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/pt_BR/admin-guide/lockup-watchdogs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/sp_SP/admin-guide/lockup-watchdogs”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ>Softlockup detector and hardlockup detector (aka nmi_watchdog)”h]”hŒ>Softlockup detector and hardlockup detector (aka nmi_watchdog)”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒJ/var/lib/git/docbuild/linux/Documentation/admin-guide/lockup-watchdogs.rst”h´KubhŒ paragraph”“”)”}”(hŒLThe Linux kernel can act as a watchdog to detect both soft and hard lockups.”h]”hŒLThe Linux kernel can act as a watchdog to detect both soft and hard lockups.”…””}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)”}”(hX6A '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/admin-guide/kernel-parameters.rst" for details), and a compile option, "BOOTPARAM_SOFTLOCKUP_PANIC", are provided for this.”h]”hXNA ‘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/admin-guide/kernel-parameters.rst†for details), and a compile option, “BOOTPARAM_SOFTLOCKUP_PANICâ€, are provided for this.”…””}”(hhÛh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)”}”(hX:A 'hardlockup' is defined as a bug that causes the CPU to loop in kernel mode for several 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 sysctl, 'hardlockup_panic', a compile time knob, "BOOTPARAM_HARDLOCKUP_PANIC", and a kernel parameter, "nmi_watchdog" (see "Documentation/admin-guide/kernel-parameters.rst" for details).”h]”hXRA ‘hardlockup’ is defined as a bug that causes the CPU to loop in kernel mode for several 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 sysctl, ‘hardlockup_panic’, a compile time knob, “BOOTPARAM_HARDLOCKUP_PANICâ€, and a kernel parameter, “nmi_watchdog†(see “Documentation/admin-guide/kernel-parameters.rst†for details).”…””}”(hhéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)”}”(hŒ×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.”h]”hŒÛ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.”…””}”(hh÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubh¶)”}”(hhh]”(h»)”}”(hŒ Configuration”h]”hŒ Configuration”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´K"ubhÌ)”}”(hXA kernel knob is provided that allows administrators to configure this period. The "watchdog_thresh" parameter (default 10 seconds) controls the threshold. The right value for a particular environment is a trade-off between fast response to lockups and detection overhead.”h]”hXA kernel knob is provided that allows administrators to configure this period. The “watchdog_thresh†parameter (default 10 seconds) controls the threshold. The right value for a particular environment is a trade-off between fast response to lockups and detection overhead.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K$hjh²hubeh}”(h]”Œ configuration”ah ]”h"]”Œ configuration”ah$]”h&]”uh1hµhh·h²hh³hÊh´K"ubh¶)”}”(hhh]”(h»)”}”(hŒImplementation”h]”hŒImplementation”…””}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj,h²hh³hÊh´K*ubhÌ)”}”(hŒØThe soft and hard lockup detectors are built around an hrtimer. In addition, the softlockup detector regularly schedules a job, and the hard lockup detector might use Perf/NMI events on architectures that support it.”h]”hŒØThe soft and hard lockup detectors are built around an hrtimer. In addition, the softlockup detector regularly schedules a job, and the hard lockup detector might use Perf/NMI events on architectures that support it.”…””}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K,hj,h²hubh¶)”}”(hhh]”(h»)”}”(hŒFrequency and Heartbeats”h]”hŒFrequency and Heartbeats”…””}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjKh²hh³hÊh´K2ubhÌ)”}”(hŒEThe core of the detectors is an hrtimer. It serves multiple purposes:”h]”hŒEThe core of the detectors is an hrtimer. It serves multiple purposes:”…””}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K4hjKh²hubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ2schedules watchdog job for the softlockup detector”h]”hÌ)”}”(hjsh]”hŒ2schedules watchdog job for the softlockup detector”…””}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K6hjqubah}”(h]”h ]”h"]”h$]”h&]”uh1johjlh²hh³hÊh´Nubjp)”}”(hŒ@bumps the interrupt counter for hardlockup detectors (heartbeat)”h]”hÌ)”}”(hjŠh]”hŒ@bumps the interrupt counter for hardlockup detectors (heartbeat)”…””}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K7hjˆubah}”(h]”h ]”h"]”h$]”h&]”uh1johjlh²hh³hÊh´Nubjp)”}”(hŒdetects softlockups”h]”hÌ)”}”(hj¡h]”hŒdetects softlockups”…””}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K8hjŸubah}”(h]”h ]”h"]”h$]”h&]”uh1johjlh²hh³hÊh´Nubjp)”}”(hŒ"detects hardlockups in Buddy mode ”h]”hÌ)”}”(hŒ!detects hardlockups in Buddy mode”h]”hŒ!detects hardlockups in Buddy mode”…””}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K9hj¶ubah}”(h]”h ]”h"]”h$]”h&]”uh1johjlh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jjh³hÊh´K6hjKh²hubhÌ)”}”(hŒÄThe period of this hrtimer is 2*watchdog_thresh/5, which is 4 seconds by default. The hrtimer has two or three chances to generate an interrupt (heartbeat) before the hardlockup detector kicks in.”h]”hŒÄThe period of this hrtimer is 2*watchdog_thresh/5, which is 4 seconds by default. The hrtimer has two or three chances to generate an interrupt (heartbeat) before the hardlockup detector kicks in.”…””}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K;hjKh²hubeh}”(h]”Œfrequency-and-heartbeats”ah ]”h"]”Œfrequency and heartbeats”ah$]”h&]”uh1hµhj,h²hh³hÊh´K2ubh¶)”}”(hhh]”(h»)”}”(hŒSoftlockup Detector”h]”hŒSoftlockup Detector”…””}”(hjïh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjìh²hh³hÊh´K@ubhÌ)”}”(hXÃThe watchdog job is scheduled by the hrtimer and runs in a stop scheduling thread. It 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.”h]”hXÇThe watchdog job is scheduled by the hrtimer and runs in a stop scheduling thread. It 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.”…””}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KBhjìh²hubeh}”(h]”Œsoftlockup-detector”ah ]”h"]”Œsoftlockup detector”ah$]”h&]”uh1hµhj,h²hh³hÊh´K@ubh¶)”}”(hhh]”(h»)”}”(hŒHardlockup Detector (NMI/Perf)”h]”hŒHardlockup Detector (NMI/Perf)”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´KKubhÌ)”}”(hŒ„On architectures that support NMI (Non-Maskable Interrupt) perf events, a periodic NMI is generated every "watchdog_thresh" seconds.”h]”hŒˆOn architectures that support NMI (Non-Maskable Interrupt) perf events, a periodic NMI is generated every “watchdog_thresh†seconds.”…””}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KMhjh²hubhÌ)”}”(hŒÝIf any CPU in the system does not receive any hrtimer interrupt (heartbeat) during the "watchdog_thresh" window, the 'hardlockup detector' (the handler for the NMI perf event) will generate a kernel warning or call panic.”h]”hŒåIf any CPU in the system does not receive any hrtimer interrupt (heartbeat) during the “watchdog_thresh†window, the ‘hardlockup detector’ (the handler for the NMI perf event) will generate a kernel warning or call panic.”…””}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KPhjh²hubhÌ)”}”(hŒ**Detection Overhead (NMI):**”h]”hŒstrong”“”)”}”(hjBh]”hŒDetection Overhead (NMI):”…””}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhj@ubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KUhjh²hubhÌ)”}”(hŒ™The time to detect a lockup can vary depending on when the lockup occurs relative to the NMI check window. Examples below assume a watchdog_thresh of 10.”h]”hŒ™The time to detect a lockup can vary depending on when the lockup occurs relative to the NMI check window. Examples below assume a watchdog_thresh of 10.”…””}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KWhjh²hubjk)”}”(hhh]”(jp)”}”(hXÑ**Best Case:** The lockup occurs just before the first heartbeat is due. The detector will notice the missing hrtimer interrupt almost immediately during the next check. :: Time 100.0: cpu 1 heartbeat Time 100.1: hardlockup_check, cpu1 stores its state Time 103.9: Hard Lockup on cpu1 Time 104.0: cpu 1 heartbeat never comes Time 110.1: hardlockup_check, cpu1 checks the state again, should be the same, declares lockup Time to detection: ~6 seconds ”h]”(hÌ)”}”(hŒ©**Best Case:** The lockup occurs just before the first heartbeat is due. The detector will notice the missing hrtimer interrupt almost immediately during the next check.”h]”(jE)”}”(hŒ**Best Case:**”h]”hŒ Best Case:”…””}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjnubhŒ› The lockup occurs just before the first heartbeat is due. The detector will notice the missing hrtimer interrupt almost immediately during the next check.”…””}”(hjnh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KZhjjubhŒ literal_block”“”)”}”(hXTime 100.0: cpu 1 heartbeat Time 100.1: hardlockup_check, cpu1 stores its state Time 103.9: Hard Lockup on cpu1 Time 104.0: cpu 1 heartbeat never comes Time 110.1: hardlockup_check, cpu1 checks the state again, should be the same, declares lockup Time to detection: ~6 seconds”h]”hXTime 100.0: cpu 1 heartbeat Time 100.1: hardlockup_check, cpu1 stores its state Time 103.9: Hard Lockup on cpu1 Time 104.0: cpu 1 heartbeat never comes Time 110.1: hardlockup_check, cpu1 checks the state again, should be the same, declares lockup Time to detection: ~6 seconds”…””}”hjŒsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jŠh³hÊh´K`hjjubeh}”(h]”h ]”h"]”h$]”h&]”uh1johjgh²hh³hÊh´Nubjp)”}”(hX—**Worst Case:** The lockup occurs shortly after a valid interrupt (heartbeat) which itself happened just after the NMI check. The next NMI check sees that the interrupt count has changed (due to that one heartbeat), assumes the CPU is healthy, and resets the baseline. The lockup is only detected at the subsequent check. :: Time 100.0: hardlockup_check, cpu1 stores its state Time 100.1: cpu 1 heartbeat Time 100.2: Hard Lockup on cpu1 Time 110.0: hardlockup_check, cpu1 stores its state (misses lockup as state changed) Time 120.0: hardlockup_check, cpu1 checks the state again, should be the same, declares lockup Time to detection: ~20 seconds ”h]”(hÌ)”}”(hXA**Worst Case:** The lockup occurs shortly after a valid interrupt (heartbeat) which itself happened just after the NMI check. The next NMI check sees that the interrupt count has changed (due to that one heartbeat), assumes the CPU is healthy, and resets the baseline. The lockup is only detected at the subsequent check.”h]”(jE)”}”(hŒ**Worst Case:**”h]”hŒ Worst Case:”…””}”(hjªh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhj¦ubhX2 The lockup occurs shortly after a valid interrupt (heartbeat) which itself happened just after the NMI check. The next NMI check sees that the interrupt count has changed (due to that one heartbeat), assumes the CPU is healthy, and resets the baseline. The lockup is only detected at the subsequent check.”…””}”(hj¦h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhj¢ubj‹)”}”(hXCTime 100.0: hardlockup_check, cpu1 stores its state Time 100.1: cpu 1 heartbeat Time 100.2: Hard Lockup on cpu1 Time 110.0: hardlockup_check, cpu1 stores its state (misses lockup as state changed) Time 120.0: hardlockup_check, cpu1 checks the state again, should be the same, declares lockup Time to detection: ~20 seconds”h]”hXCTime 100.0: hardlockup_check, cpu1 stores its state Time 100.1: cpu 1 heartbeat Time 100.2: Hard Lockup on cpu1 Time 110.0: hardlockup_check, cpu1 stores its state (misses lockup as state changed) Time 120.0: hardlockup_check, cpu1 checks the state again, should be the same, declares lockup Time to detection: ~20 seconds”…””}”hjÂsbah}”(h]”h ]”h"]”h$]”h&]”jšj›uh1jŠh³hÊh´Kphj¢ubeh}”(h]”h ]”h"]”h$]”h&]”uh1johjgh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÔŒ*”uh1jjh³hÊh´KZhjh²hubeh}”(h]”Œhardlockup-detector-nmi-perf”ah ]”h"]”Œhardlockup detector (nmi/perf)”ah$]”h&]”uh1hµhj,h²hh³hÊh´KKubh¶)”}”(hhh]”(h»)”}”(hŒHardlockup Detector (Buddy)”h]”hŒHardlockup Detector (Buddy)”…””}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjåh²hh³hÊh´KyubhÌ)”}”(hŒÇOn architectures or configurations where NMI perf events are not available (or disabled), the kernel may use the "buddy" hardlockup detector. This mechanism requires SMP (Symmetric Multi-Processing).”h]”hŒËOn architectures or configurations where NMI perf events are not available (or disabled), the kernel may use the “buddy†hardlockup detector. This mechanism requires SMP (Symmetric Multi-Processing).”…””}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K{hjåh²hubhÌ)”}”(hŒÖIn this mode, each CPU is assigned a "buddy" CPU to monitor. The monitoring CPU runs its own hrtimer (the same one used for softlockup detection) and checks if the buddy CPU's hrtimer interrupt count has increased.”h]”hŒÜIn this mode, each CPU is assigned a “buddy†CPU to monitor. The monitoring CPU runs its own hrtimer (the same one used for softlockup detection) and checks if the buddy CPU’s hrtimer interrupt count has increased.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjåh²hubhÌ)”}”(hX«To ensure timeliness and avoid false positives, the buddy system performs checks at every hrtimer interval (2*watchdog_thresh/5, which is 4 seconds by default). It uses a missed-interrupt threshold of 3. If the buddy's interrupt count has not changed for 3 consecutive checks, it is assumed that the buddy CPU is hardlocked (interrupts disabled). The monitoring CPU will then trigger the hardlockup response (warning or panic).”h]”hX­To ensure timeliness and avoid false positives, the buddy system performs checks at every hrtimer interval (2*watchdog_thresh/5, which is 4 seconds by default). It uses a missed-interrupt threshold of 3. If the buddy’s interrupt count has not changed for 3 consecutive checks, it is assumed that the buddy CPU is hardlocked (interrupts disabled). The monitoring CPU will then trigger the hardlockup response (warning or panic).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K„hjåh²hubhÌ)”}”(hŒ**Detection Overhead (Buddy):**”h]”jE)”}”(hj"h]”hŒDetection Overhead (Buddy):”…””}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K‹hjåh²hubhÌ)”}”(hŒBWith a default check interval of 4 seconds (watchdog_thresh = 10):”h]”hŒBWith a default check interval of 4 seconds (watchdog_thresh = 10):”…””}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjåh²hubjk)”}”(hhh]”(jp)”}”(hŒt**Best case:** Lockup occurs just before a check. Detected in ~8s (0s till 1st check + 4s till 2nd + 4s till 3rd).”h]”hŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒr**Best case:** Lockup occurs just before a check. Detected in ~8s (0s till 1st check + 4s till 2nd + 4s till 3rd).”h]”(hŒterm”“”)”}”(hŒ1**Best case:** Lockup occurs just before a check.”h]”(jE)”}”(hŒ**Best case:**”h]”hŒ Best case:”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjYubhŒ# Lockup occurs just before a check.”…””}”(hjYh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWh³hÊh´KhjSubhŒ definition”“”)”}”(hhh]”hÌ)”}”(hŒ@Detected in ~8s (0s till 1st check + 4s till 2nd + 4s till 3rd).”h]”hŒ@Detected in ~8s (0s till 1st check + 4s till 2nd + 4s till 3rd).”…””}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khjwubah}”(h]”h ]”h"]”h$]”h&]”uh1juhjSubeh}”(h]”h ]”h"]”h$]”h&]”uh1jQh³hÊh´KhjNubah}”(h]”h ]”h"]”h$]”h&]”uh1jLhjHubah}”(h]”h ]”h"]”h$]”h&]”uh1johjEh²hh³Nh´Nubjp)”}”(hŒv**Worst case:** Lockup occurs just after a check. Detected in ~12s (4s till 1st check + 4s till 2nd + 4s till 3rd). ”h]”jM)”}”(hhh]”jR)”}”(hŒt**Worst case:** Lockup occurs just after a check. Detected in ~12s (4s till 1st check + 4s till 2nd + 4s till 3rd). ”h]”(jX)”}”(hŒ1**Worst case:** Lockup occurs just after a check.”h]”(jE)”}”(hŒ**Worst case:**”h]”hŒ Worst case:”…””}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhj«ubhŒ" Lockup occurs just after a check.”…””}”(hj«h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jWh³hÊh´K’hj§ubjv)”}”(hhh]”hÌ)”}”(hŒADetected in ~12s (4s till 1st check + 4s till 2nd + 4s till 3rd).”h]”hŒADetected in ~12s (4s till 1st check + 4s till 2nd + 4s till 3rd).”…””}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K’hjÇubah}”(h]”h ]”h"]”h$]”h&]”uh1juhj§ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jQh³hÊh´K’hj¤ubah}”(h]”h ]”h"]”h$]”h&]”uh1jLhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1johjEh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”jÔjÜuh1jjh³hÊh´Khjåh²hubhÌ)”}”(hŒ&**Limitations of the Buddy Detector:**”h]”jE)”}”(hjøh]”hŒ"Limitations of the Buddy Detector:”…””}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjöubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K”hjåh²hubhŒenumerated_list”“”)”}”(hhh]”(jp)”}”(hŒ“**All-CPU Lockup:** If all CPUs lock up simultaneously, the buddy detector cannot detect the condition because the monitoring CPUs are also frozen.”h]”hÌ)”}”(hŒ“**All-CPU Lockup:** If all CPUs lock up simultaneously, the buddy detector cannot detect the condition because the monitoring CPUs are also frozen.”h]”(jE)”}”(hŒ**All-CPU Lockup:**”h]”hŒAll-CPU Lockup:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjubhŒ€ If all CPUs lock up simultaneously, the buddy detector cannot detect the condition because the monitoring CPUs are also frozen.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K–hjubah}”(h]”h ]”h"]”h$]”h&]”uh1johjh²hh³hÊh´Nubjp)”}”(hXn**Stack Traces:** Unlike the NMI detector, the buddy detector cannot directly interrupt the locked CPU to grab a stack trace. It relies on architecture-specific mechanisms (like NMI backtrace support) to try and retrieve the status of the locked CPU. If such support is missing, the log may only show that a lockup occurred without providing the locked CPU's stack. ”h]”hÌ)”}”(hXm**Stack Traces:** Unlike the NMI detector, the buddy detector cannot directly interrupt the locked CPU to grab a stack trace. It relies on architecture-specific mechanisms (like NMI backtrace support) to try and retrieve the status of the locked CPU. If such support is missing, the log may only show that a lockup occurred without providing the locked CPU's stack.”h]”(jE)”}”(hŒ**Stack Traces:**”h]”hŒ Stack Traces:”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhj<ubhX^ Unlike the NMI detector, the buddy detector cannot directly interrupt the locked CPU to grab a stack trace. It relies on architecture-specific mechanisms (like NMI backtrace support) to try and retrieve the status of the locked CPU. If such support is missing, the log may only show that a lockup occurred without providing the locked CPU’s stack.”…””}”(hj<h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K™hj8ubah}”(h]”h ]”h"]”h$]”h&]”uh1johjh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1j hjåh²hh³hÊh´K–ubeh}”(h]”Œhardlockup-detector-buddy”ah ]”h"]”Œhardlockup detector (buddy)”ah$]”h&]”uh1hµhj,h²hh³hÊh´Kyubeh}”(h]”Œimplementation”ah ]”h"]”Œimplementation”ah$]”h&]”uh1hµhh·h²hh³hÊh´K*ubh¶)”}”(hhh]”(h»)”}”(hŒWatchdog Core Exclusion”h]”hŒWatchdog Core Exclusion”…””}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjyh²hh³hÊh´K¡ubhÌ)”}”(hXBy default, the watchdog runs on all online cores. However, on a kernel configured with NO_HZ_FULL, by default the watchdog runs only on the housekeeping cores, not the cores specified in the "nohz_full" boot argument. If we allowed the watchdog to run by default on the "nohz_full" cores, we would have to run timer ticks to activate the scheduler, which would prevent the "nohz_full" functionality from protecting the user code on those cores from the kernel. Of course, disabling it by default on the nohz_full cores means that when those cores do enter the kernel, by default we will not be able to detect if they lock up. However, allowing the watchdog to continue to run on the housekeeping (non-tickless) cores means that we will continue to detect lockups properly on those cores.”h]”hX#By default, the watchdog runs on all online cores. However, on a kernel configured with NO_HZ_FULL, by default the watchdog runs only on the housekeeping cores, not the cores specified in the “nohz_full†boot argument. If we allowed the watchdog to run by default on the “nohz_full†cores, we would have to run timer ticks to activate the scheduler, which would prevent the “nohz_full†functionality from protecting the user code on those cores from the kernel. Of course, disabling it by default on the nohz_full cores means that when those cores do enter the kernel, by default we will not be able to detect if they lock up. However, allowing the watchdog to continue to run on the housekeeping (non-tickless) cores means that we will continue to detect lockups properly on those cores.”…””}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K£hjyh²hubhÌ)”}”(hŒöIn either case, the set of cores excluded from running the watchdog may be adjusted via the kernel.watchdog_cpumask sysctl. For nohz_full cores, this may be useful for debugging a case where the kernel seems to be hanging on the nohz_full cores.”h]”hŒöIn either case, the set of cores excluded from running the watchdog may be adjusted via the kernel.watchdog_cpumask sysctl. For nohz_full cores, this may be useful for debugging a case where the kernel seems to be hanging on the nohz_full cores.”…””}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K°hjyh²hubeh}”(h]”Œwatchdog-core-exclusion”ah ]”h"]”Œwatchdog core exclusion”ah$]”h&]”uh1hµhh·h²hh³hÊh´K¡ubeh}”(h]”Œsoftlockup detector and hardlockup detector (aka nmi_watchdog)”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jÙŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j³j°j)j&jvjsjéjæjj jâjßjnjkj«j¨uŒ nametypes”}”(j³‰j)‰jv‰jé‰j‰jâ‰jn‰j«‰uh}”(j°h·j&jjsj,jæjKj jìjßjjkjåj¨jyuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.