test(bench): cap per-syscall repeat under PACKETFRAME_BENCH_QUICK - #82
Merged
Conversation
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>
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.
Why
The qemu 5.15 job on PR #81 (a docs-only diff) timed out at 20 minutes with
bench_allowlistandbench_custom_fibsoft-lockup-splatting inside singlebpf_prog_test_runsyscalls (R15 = 0x2710 — the fullMISS_REPEAT = 10_000).PACKETFRAME_BENCH_QUICKdivides 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-repeatbpf_test_runruns ~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/RxTotaldeltas) 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