You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(runtime): skip foreground slice timing when no foreground work is runnable #37
Follow-up to #33 (worker-owned shared-ring progression and sleep coordination). This is a source-based optimization opportunity, not a measured performance result.
Current behavior
Worker::RunOnce() reads CycleNow before and after DrainReadyUntil even when both foreground ready and remote-work queues are empty. Such rounds perform empty dispatch and timing calculations with a zero resume count. Empty polling and waiting for SPDK completions are candidate workloads.
Proposed work
After completion polling and deferred-queue merging, bypass the foreground slice when no foreground work is runnable. Preserve foreground/background admission and runtime accounting. Consider the cost of the added busy-path branch; do not assume fewer source statements mean fewer release instructions.
Checking deadlines less frequently inside a nonempty drain is outside this initial change: it alters cooperative scheduling overrun and tail-latency bounds.
Acceptance
Inspect optimized code and measure empty-round instructions/cycles and clock reads before/after.
Benchmark empty polling, SPDK-outstanding rounds, and saturated short foreground tasks to detect branch-related regressions.
Test work made runnable by completion polling, deferred continuations, remote foreground work, and background-only scheduling.
Preserve scheduler statistics definitions, foreground/background budgets and fairness; document any intentional accounting change.
Retain only if the empty-round saving does not cause an unacceptable busy-path regression.
Benchmark reports should identify the tested revision/build and compare instructions, cycles, throughput, and p99 latency where relevant. Record only non-default settings after checking the tested version's defaults. Preserve notification preparation/recheck/cleanup, mailbox wake_seq, DPDK parked handshakes, and pending-I/O sleep vetoes.
Activity