Panel: a core's CPU counters that step back read as idle, not a panic #325
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by alexdeliu on 2026-11-26T20:19:52Z.
With
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