⚡️kernel: feed task-liveness watchdog every 3 s instead of every second#1660
Open
Coral-coder wants to merge 2 commits into
Open
⚡️kernel: feed task-liveness watchdog every 3 s instead of every second#1660Coral-coder wants to merge 2 commits into
Coral-coder wants to merge 2 commits into
Conversation
…cond Three always-on per-second callbacks existed purely to set task liveness bits (NewTimers, KernelBG idle, PULSE idle) for the task watchdog. The hardware watchdog allows 10s between feeds on SF32LB52 and 8s on nRF52, and the bit-gated feed only needs every watched task to check in within that window, so a 3-second cadence keeps at least ~5s of margin while cutting these callbacks' wakeups by two thirds. Busy tasks still check in far more often as a side effect of doing work; this only changes the idle cadence. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ara Michelle <coral-coder@proton.me> (cherry picked from commit 454fb05)
The launcher event loop woke every second even with no events pending, purely so the loop iteration could refresh KernelMain's watchdog bit. Events wake the loop immediately regardless of the timeout, so stretch the idle timeout to 3 seconds, matching the other task liveness feeds and keeping ~5s of margin against the shortest (8s, nRF52) hardware watchdog window. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ara Michelle <coral-coder@proton.me> (cherry picked from commit a246fbf)
gmarull
reviewed
Jul 17, 2026
Comment on lines
+596
to
+599
| // The timeout exists only to refresh the watchdog bit above; events wake | ||
| // the loop immediately. 3s keeps ~5s of margin against the shortest (8s) | ||
| // hardware watchdog while letting an idle KernelMain sleep 3x longer. | ||
| if (event_take_timeout(&e, 3000)) { |
Member
There was a problem hiding this comment.
let's not touch this (yet), task watchdog needs a bit of love first.
Contributor
Author
There was a problem hiding this comment.
It very well did, but it seems to work fine these past 2 weeks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two related cadence changes, one per commit:
Why
On an otherwise-idle watch these two are a steady 2 wakeups/second that serve no purpose beyond watchdog bookkeeping. This cuts them to ~0.7/s combined.
Testing
Full unit suite passes; field-tested on SF32LB52 (Obelix) alongside the other idle-wakeup changes — no watchdog resets over multi-day soak, hang detection verified still working via a deliberately-stalled task.