Repository navigation
Performance Research A06 Voice Worker Scheduling
| Field | Value |
|---|---|
| Evidence state | Existing worker architecture; regrouping PCM counterexample reproduced |
| Inspected source | 322986f4c5502b3fa887a9605ac8cd88e9b2c579 |
| First experiment | Inline small eligible work while preserving multipass grouping |
| Scope | Addendum dated September 15, 2026; not a current-main benchmark or implementation status |
Unproven performance research · Performance research — common test protocol · Performance research — reproducible checks
Existing parallelism matters. xemu already has persistent voice workers, per-worker mix buffers, and a grouping scheduler for multipass dependencies. Empty work queues already avoid dispatch. The next idea is therefore adaptive granularity and cheaper reduction, not simply “add threads.” Worker implementation.
Specific opportunities. Run very small independent workloads inline; wake only useful workers; avoid clearing/reducing untouched bins where numerical and state semantics permit it. Measure whether serialized merge work and cache-line ownership transfers dominate as the worker count rises. Keep multipass source/clear/consumer groups intact.
Break-even model. Parallel work is worthwhile only when serial_work > scheduling + critical_worker_work + merge. Logical-core count alone is not a valid scheduling policy. Existing merges occur under the dispatch mutex in worker completion order, so do not assume today's output is already bit-deterministic across worker counts.
Numerical issue. Binary32 addition is not associative. The supplied checks include a normalized-amplitude counterexample. Changing reduction grouping can change mixer bits and, near a quantization boundary, the final 24-bit sample. Specify a canonical comparison order or an explicitly justified numerical acceptance policy instead of assuming mathematical real-number associativity.
Acceptance. Test 0/1/few/many voices, uneven HRTF loads, multipass groups, cancellation, saturation, different worker counts, pause/resume, and shutdown. Report scheduling, processing, merge, and total APU deadline misses independently.
Measure the break-even point before choosing a threshold. Do not combine altered reduction order with a claim of bitwise-equivalent scheduling.
eligible voices -> dependency groups -> useful workers or inline -> defined reduction order
Locate the inspected seam before editing; names or ownership may have changed since the pinned review:
git grep -n -E 'voice_work_dispatch|voice_work_schedule|voice_worker_thread' -- hw/xbox/mcpx/apu/vpThese are implementation gates to add or exercise, not claims that production tests already exist or passed. Retained standalone checks are on the checks page.
| Test ID | Setup / deliberate control | Required oracle |
|---|---|---|
A06.01 |
0, 1, 2, 4, 32 and 256 eligible voices; repeat with uneven HRTF cost and supported worker counts. | All voices run exactly once; small-work overhead and imbalance are visible separately. |
A06.02 |
Multipass source/clear/consumer groups; pause and shutdown with workers delayed. | Dependency order survives; every pending owner completes or is canceled correctly. |
A06.03 |
Run the binary32/PCM regrouping model and compare production output using a declared canonical order. | The model yields PCM 1 versus 0; production output uses an explicitly defined equivalence policy, not real-number associativity. |
Collect: queued_voices, active_workers, empty_wakes, schedule_cpu_ns, worker_cpu_ns, merge_cpu_ns, deadline_misses. Keep exact counts separate from sampled durations; use an uninstrumented build for performance qualification.
Reject or hold: Reject lost/duplicated voices, broken multipass state or unexplained output drift. Compare total APU time and frame deadlines, not aggregate worker utilization.
Follow the common protocol for source identities, previous-main/fixed-baseline controls, raw results, confidence and retail/XISO qualification. No gain becomes proven from a model, cache hit, local operation count, or shifted wait label alone.
DSP tooling guide and navigation updated November 2, 2026 for experimental PR #384, source 8f51d237. Capture/replay usage and limits.
The earlier wiki-wide review was published November 1, 2026. Emulator source: b7140848. Reviewed wiki content: 1d2b671. Current status · Release availability · Publication process.
- Home
- Current status
- Stable versus main
- Implemented mechanisms
- Controls and defaults
- Measured results and limits
- Complete change register
- System
- CPU and vCPU
- Memory and DMA
- Graphics / NV2A
- APU and audio
- Timing and timers
- Platform and I/O
- Hardware observations
- Fidelity boundaries
- Methodology
- PGR2 routes
- Debugging lag / hot paths
- Tools and commands
- DSP capture, replay and fuzzing
- HLE readiness and public XISO proof
- Concurrent DSP shadow and OpenAL proof
- DSP HLE operation inventory
- DSP HLE fix examples and testing
- Development
- Upstream shortlist
- Wiki maintenance
- Research / retired work
- Optimization catalog
- Hot-path shortcuts
- Researched experiments
- Unproven proposal directory
- PR lessons
- September26 snapshot
Repository · PRs · Issues