| commit | c24ad8bc3682292d289537dfaa19bf549abfcc15 | [log] [tgz] |
|---|---|---|
| author | Patryk Busse <[email protected]> | Wed Jun 05 14:30:45 2024 |
| committer | Chromeos LUCI <[email protected]> | Fri Jul 12 09:57:12 2024 |
| tree | 5dc8100d1634f2122ab848b37097d29c4a41fd48 | |
| parent | 7432b6a20d8bfc646af8e201515fbf526427e441 [diff] |
daisydog: refactor closing, config and keepalive Add function closing the watchdog to ensure all needed steps are executed and errors logged. Replace write "w" with proper keepalive ioctl: WDIOC_KEEPALIVE for clarity. Add check before entering sleeping to minimize chance of delaying close of the process. Add fallback to interval of 30s when set interval was too low. BUG=b:287218810 TEST=manually check if behaviour is correct TEST=test_that <IP> platform_HWwatchdog TEST=suspend_stress_test --wake_min 65 --suspend_min 65 -c 100 TEST=tast run <IP> crash.WatchdogCrash Change-Id: Ibe8f67deae5e0e197099e338ac95919f50d430a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/daisydog/+/5601389 Reviewed-by: Marek Maślanka <[email protected]> Reviewed-by: Tim Van Patten <[email protected]> Reviewed-by: Mike Frysinger <[email protected]> Tested-by: Patryk Busse <[email protected]> Commit-Queue: Patryk Busse <[email protected]>
GPL Code is copied with explicit permission from Daniel Widyanto:
http://embeddedfreak.wordpress.com/2010/08/23/howto-use-linux-watchdog/
The project name is based on Samsung's “daisy” reference board design and I liked this quote from the daisy dog FAQ:
Daisy Dogs are not persnickety little ankle biters
When this daisydog doesn't run, the machine should reset. :)
An alternative code to start with would have been:
https://dev.openwrt.org/ticket/2270
The watchdog project is alot more complicated than what the Chromium OS project needs.