Skip to content

test(bench): cap per-syscall repeat under PACKETFRAME_BENCH_QUICK - #82

Merged
lunarthegrey merged 2 commits into
mainfrom
ci/bench-watchdog-headroom
Aug 2, 2026
Merged

test(bench): cap per-syscall repeat under PACKETFRAME_BENCH_QUICK#82
lunarthegrey merged 2 commits into
mainfrom
ci/bench-watchdog-headroom

Conversation

@lunarthegrey

Copy link
Copy Markdown
Contributor

Why

The qemu 5.15 job on PR #81 (a docs-only diff) timed out at 20 minutes with bench_allowlist and bench_custom_fib soft-lockup-splatting inside single bpf_prog_test_run syscalls (R15 = 0x2710 — the full MISS_REPEAT = 10_000).

PACKETFRAME_BENCH_QUICK divides the syscall count by 25 but leaves the per-syscall repeat untouched. The soft-lockup watchdog's unit of concern is one uninterruptible syscall: a 10k-repeat bpf_test_run runs ~20 s of kernel time on a slow TCG runner, straddling the 22 s watchdog line. Runner-speed variance then decides the job — the 6.6 VM passed in 11 min while 5.15 watchdog-cascaded (each fire dumps ~35 lines to the emulated serial console, slowing the VM further) into the timeout, on identical code.

What

Quick mode now bounds both knobs: bench_params(repeat, calls) caps repeat at 1_000 (an order of magnitude under the watchdog on any runner) alongside the existing calls/25. Full-mode (hardware) behavior is byte-identical. Sanity asserts (FwdOk/RxTotal deltas) compute from the actual parameters used.

Gate: the qemu matrix on this PR is the real test; host builds skip this file (cfg(target_os = "linux")).

🤖 Generated with Claude Code

lunarthegrey and others added 2 commits July 31, 2026 22:18
Quick mode divided the syscall count by 25 but left MISS_REPEAT=10_000
per syscall. The soft-lockup watchdog's unit of concern is one
uninterruptible bpf_test_run: 10k repeats is ~20 s of kernel time on a
slow TCG runner, straddling the 22 s watchdog line, so runner speed
decided the job — PR #81's docs-only diff passed qemu 6.6 in 11 min
and watchdog-cascaded 5.15 into the 20-min timeout on identical code.

Cap repeat at 1_000 under quick mode (10x under the watchdog on any
runner); full-mode hardware behavior is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… thousands

The first cap was insufficient, and PR #86's 5.15 job proved it: the
soft lockup landed in a FORWARD bench whose repeat is 200, so the
1_000-repeat cap never applied. Total volume was the problem — 200
calls x 200 repeats = 40k executions, and TCG stalls a CPU past the
22 s watchdog on the aggregate regardless of per-syscall size.

Quick mode now caps both knobs hard (50 repeats, 8 calls -> ~400
executions per bench). The assertions CI actually cares about — the
FwdOk/RxTotal deltas and the TTL-budget guard that catches a bench
silently measuring the PassLowTtl path — are exactly as strong at 400
executions as at 1M. The ns/pkt statistics were never meaningful under
emulation; hardware runs full mode via the hwtest bundle.

Unblocks the qemu 5.15 job on every branch that carries this fix.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lunarthegrey
lunarthegrey merged commit b2ce6c7 into main Aug 2, 2026
10 checks passed
@lunarthegrey
lunarthegrey deleted the ci/bench-watchdog-headroom branch August 2, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant