Repository navigation
perf(reactor): remove the late-round heuristic (CWIST_REACTOR_LATE_US) - #377
Merged
Merged
Conversation
The late-round mode from bc358b4 (issue #319 experiment) switched the rest of an io_uring dispatch round into a no-yield, flush-per-callback mode once the round had run past 3 ms. It never showed a tail improvement beyond noise in the same-runner A/B, and the follow-up age-based variant (#375) was neutral too. Drop it: - reactor.c: reactor_late_ns(), cwist_reactor_dispatch_late(), the per-callback clock read and late flush, and the late_rounds / late_callbacks probe counters; - reactor_rx.h: the cwist_reactor_dispatch_late() declaration and stub; - app.c: the HTTP handler yields every yield_batch requests again, with no late bypass; the now unused reactor_rx.h include goes too; - tests/test_reactor_late.c and its Makefile target; - the CWIST_REACTOR_LATE_US rows in docs/runtime-config.md (en, ko); - the "CWIST C1M (late mode off)" benchmark leg. The round-budget flush (CWIST_REACTOR_ROUND_BUDGET_US) and the post-drain chunking (CWIST_REACTOR_DRAIN_CHUNK) are unchanged. Past cwist_c1m_lateoff rows in benchmarks/webserver.json stay as history.
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.
Summary
Removes the late-round heuristic (
CWIST_REACTOR_LATE_US, default 3000 us) that bc358b4 added as a #319 experiment.The heuristic watched each io_uring dispatch round. Once a round had run past the threshold, it switched the rest of that round into late mode:
Why remove it: the same-runner A/B never showed a tail improvement beyond noise. The follow-up age-based version (#375, now closed) was neutral up to c1024.
Removed
src/sys/io/reactor.c:reactor_late_ns()andcwist_reactor_dispatch_late();late_rounds/late_callbackslatency-probe counters.src/sys/io/reactor_rx.h: thecwist_reactor_dispatch_late()declaration and its non-Linux stub.src/sys/app/app.c:yield_batchrequests, with no late bypass;reactor_rx.hinclude is gone.tests/test_reactor_late.cand its Makefile target.CWIST_REACTOR_LATE_USrows indocs/runtime-config.mdanddocs/ko/runtime-config.md.bsd-kqueue-benchmarks.yml, and its mention inscripts/ci/benchmark.py.Unchanged
CWIST_REACTOR_ROUND_BUDGET_US(round-budget flush) andCWIST_REACTOR_DRAIN_CHUNK(post-drain chunking).cwist_c1m_lateoff_*rows inbenchmarks/webserver.json, kept as history.check_api_baselinepasses.Verification
make testpasses on both the default backend andCWIST_REACTOR_BACKEND=epoll.check_test_wiring,check_env_knobs,check_api_baselineandcheck_inline_exportspass.