Experiment with indexed I/O ready workers - #33
Draft
yxanul wants to merge 3 commits into
Draft
Conversation
# Conflicts: # runtime/zmeu_runtime_parts/00_common.c # runtime/zmeu_runtime_parts/20_scheduler.c # tests/reactor_echo/run_one.sh
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
Draft experiment PR. Do not merge for now.
This keeps the existing per-worker
io_inboxtask storage model, adds an optional ready-worker index, and keeps the single global I/O-ready queue as an env-gated control.New knobs:
ZMEU_TASK_GLOBAL_IO_READY=1: route resumed I/O tasks through one global I/O task queue.ZMEU_TASK_IO_READY_INDEX=1: keep resumed I/O tasks in the home worker inbox, index worker IDs whose inboxes transitioned empty -> non-empty, and use the normal gated wake instead of targeted home-worker wakes.The index path is advisory: stale worker IDs are allowed, and indexed workers are requeued when a pop leaves more inbox work behind. Victim inbox scanning remains as a fallback.
Findings
Quiet reactor echo benchmark, 1024 connections x 1000 rounds:
One quiet base W24 run failed in the load generator with connection reset/refused and was excluded.
Counter run signal:
15.6, global5.1, index5.2.23.2, global6.7, index7.8.0.228, global0.053, index0.068.0.227, global0.037, index0.052.Interpretation:
CPU sanity:
zparallel_digest: neutral at W24/W32.runtime_wakeup_hell: index was about 1-2.5% slower in 200-run batches.Validation
cargo fmt --checkcargo build --release --features mlir-backendcargo test --features mlir-backend deterministic_task_counterscargo test --features mlir-backend scheduler_gauntletcargo test --features mlir-backend wakeup_hell_gauntletcargo test --features mlir-backend batch_steals_worker_deque_backloggit diff --checkFollow-up Ideas
io_ready_listedflag to reduce stale index entries.