3 ms·
I agree. the type safety that it brings to the HAL. it's a like cushion for people entering this space. never understood what a watchdog is tho...
by cat-whisperer 10mo ago
I agree. the type safety that it brings to the HAL. it's a like cushion for people entering this space.
never understood what a watchdog is tho...
- VorpalWay 10mo agoA watchdog is a piece of hardware that will automatically restart the chip if it detects the code as being stuck. The way it detects this is that you have to poke a register of the watchdog every so often, and if the register hasn't been poked for a certain timeout (usually configurable), the chip is restarted. Watchdogs exist on MCUs but also on some "proper" computers. The Raspberry Pi has one for example.
- 5d41402abc4b 10mo ago>Watchdogs exist on MCUs but also on some "proper" computers All modern computers have watchdog. You can check your logs `journalctl -b | grep watchdog` https://access.redhat.com/articles/7129255 https://access.redhat.com/articles/7129255
- LtdJorge 10mo agoYes, but those are done in software
- p_l 10mo agoThere's generally at least one watchdog device available in most PCs delivered in last decade, but it's not always utilized. Essentially at one point an intel southbridge integrated a basic watchdog on all models, and it started to just... be included. So these days you can find a variation on the TCO timer watchdog in most PCs, even if the exact implementation varies so we now have a bunch of drivers for the different variants.
- VorpalWay 9mo agoLinux doesn't see one on my Ryzen 5600X desktop at least. My Intel Skylake Thinkpad does seem to have two though (iTCO as well as INT3F0D, not sure what that is, but if I interpret the files under /sys correctly it belongs to the LPC/eSPI controller PCIe device, while the TCO watchdog is found under the SMBus PCIe device). In both cases they do have software watchdogs (NMI based) which relies on a hardware timer triggering an NMI in the kernel. But that relies on the NMI handler still working, which is not as good as a real HW watchdog.
- p_l 9mo agoApparently it depends to a little bit on how the motherboard is designed, theoretically SP5100 watchdog which is part of the CPU logic in recent ryzens, apparently, is supposed to be enabled if the motherboard is designed with IPMI in mind. For whatever reason, it's enabled on my laptop despite it obviously not having IPMI support :)
- cozzyd 10mo agohttps://www.freedesktop.org/software/systemd/man/latest/systemd-system.conf.html?__goaway_challenge=meta-refresh&__goaway_id=393f6aaea98836217f6c8267dc046ab9&__goaway_referer=https%3A%2F%2Fwww.google.com%2F#Hardware%20Watchdog https://www.freedesktop.org/software/systemd/man/latest/syst...
- cat-whisperer 10mo agomac’s too?
- throwup238 10mo ago“All CPUs” would probably be 99.9999% accurate. It’s just one of those fundamental functions you want in a processor. Whether it’s exposed in the OS is a different matter.
- LtdJorge 9mo agoAMD doesn't have it. I just confirmed by grepping through dmesg and journalctl -b, the only time it appears is due to UPS driver notifications (unrelated).
- inferiorhuman 10mo agoCortex-A includes a watchdog so yeah.
- lgas 10mo agoThat's a software watchdog. The comment you're replying to is talking about hardware watchdogs.
- the__alchemist 10mo agoYou don't need to poke the watchdog! Petting or feeding is fine too.
- cat-whisperer 10mo agolol