mirror of
https://github.com/RhapsodiOS/RhapsodiOS.git
synced 2026-11-03 22:01:40 -07:00
[GH-ISSUE #44] stress: report backward gettimeofday steps instead of silently clamping them #37
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/RhapsodiOS#37
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @raynorpat on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/RhapsodiOS/RhapsodiOS/issues/44
Summary
The stress suite library (
src/Commands/stress/lib/main.c,st_op_end, ffs-perf branch) times each operation with twogettimeofday()calls. Since76352bb54it clamps a negative interval to 0, somaxlat=can no longer wrap to4294967mswhen the clock steps backwards (#40).The clamp keeps the reports sane, but it hides the very symptom #40 describes: a run on an affected kernel looks identical to a run on a fixed one. It was added as a workaround and needs a follow-up.
Proposed change
st_op_end, count the intervals that came out negative (per worker, summed by the leader).clockback=Nfield to the PASS line when N > 0. The grammar is unchanged otherwise: a key=value field, no spaces.vm/stress_report.pyshould carry it into the summary and the kernel comparison.maxlat/ops, so latency figures stay meaningful.stress-proc clockorstress-vm clock) that loopsgettimeofday()for a few seconds across all CPUs and FAILs withback=N maxback=Nusif time ever goes backwards. That makes #40 a pass/fail regression test instead of a side effect of other tests.When to revisit
Once #40 is fixed,
clockbackshould read 0 everywhere, and the dedicated test should PASS. Keep the clamp after that as protection againstsettimeofday/adjtimesteps during a run.Related: #40.
@raynorpat commented on GitHub (Oct 14, 2026):
Implemented on ffs-perf in
e1f7a7d84(not yet pushed or built on a guest).st_op_endcounts negative intervals per worker, the leader sums them, and the PASS line getsclockback=Nwhen N > 0. The clamp for maxlat/ops is kept.Not done: the optional
stress-vm clocktest, and carryingclockbackinto the summary and kernel comparison (vm/stress_report.pyisn't on ffs-perf). Leaving open for those.@raynorpat commented on GitHub (Oct 14, 2026):
Done on ffs-perf (not yet pushed):
e1f7a7d84counts negative op intervals and prints clockback=N on the PASS line (the maxlat/ops clamp stays);5b1b6a968addsstress-vm clock(strict compare of each gettimeofday with the previous one, FAILs with back=N maxback=Nus) andstress-vm settime(settimeofday steps back/forward with and without a pending negative adjtime slew; root only, solo, restores the clock on failure and on signals viacf75fcd0d). Both are in vm/runtests (settime only in the solo pass).On the stock v2 kernel, clock FAILed (back=1, 8.8 ms) and settime FAILed within 1-56 iterations; on the fixed kernel (#40) both PASS and the -x self-checks FAIL as intended.
Not done: carrying clockback into a summary/kernel comparison, since vm/stress_report.py is not on this branch. Reopen or file a follow-up when that script lands.