Panel: a core's CPU counters that step back read as idle, not a panic #325
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!325
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-325"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@alexdeliu on GitHub · 2026-11-26 20:19 UTC · original
alexdeliu:fix/panel-cpu-counter-backwards→a-publier· +32 −3 · 1 files · 1 commits · merged 2026-11-26 22:30 UTCWith
VICTORY_PANEL=1a run on my PC (Ryzen 7 7700, RX 9070,a-publiercd8dfc0) ended about a minute in with:CpuMetertook each core's busy share as(ni - pi).clamp(0, nt - pt). One core's kernel+user counter stepped back between two reads (by 156,250 × 100 ns),clamp(0, negative)panicked, and it took the submitting thread down with it. Since PortWatch now asks for overlays on clips, more people will run with the panel on.The share is now a small function,
busy_pct: no time passed, or a counter that stepped back, reads 0 %. Otherwise it's the same formula as before. Two tests cover it:busy_is_the_share_of_time_not_idleandcounters_that_step_back_do_not_panic.Tested:
cargo test -p victory-gpu --lib busy_tests: 2 passed.cargo clippy -p victory-shader -p victory-gpu --all-targets: 2 warnings, the same as ona-publier.🤖 Generated with Claude Code