flybrain/services/flysim/crates/fly-legacy-session/src
acamilo 8fa98b0b03 session: pin the sweep workers one per cpu in flysim-session (PERF-02)
CUT-01's speed probation fell back at a median realtime factor of 0.959.
With exactly as many cpus as sweep threads, the session's host threads
(dispatching tokio worker, coordinator, listeners) sleep and wake around
every transition, the sweep workers park and wake with them, and the
scheduler often stacks two workers on one cpu: the session's ticks ran
about 35% slower than the legacy loop's on the same frames (equal with a
spare cpu).

flybrain_core::pool::place_workers gives each spawned sweep worker a cpu
of its own and confines every other thread to the rest of the cpuset;
flysim-session calls it before spawning anything (in-process and thread
modes; FLY_SESSION_PIN=0 turns it off). Placement chooses cpus only, so
no result, trace or checkpoint changes; the legacy loop, process mode and
the shadow binary never call it. The compatibility string is unchanged.

On the release cpu model, 4 cpus, 4 threads, same frames: session 16.16
-> 12.98 ms/frame (legacy 10.53). The service's profile line prints the
measurement spans and the brain's phase split when FLY_SESSION_PROFILE is
set. Docs: legacy-gameboy-v1 section 12 amendment, implementation entry.
2026-10-01 12:16:59 +00:00
..
bin shadow: SHADOW-02, the shadow run on a build box 2026-10-01 00:45:54 +00:00
shadow shadow: r3 notes: a reward skip still reads on for a stop; the relay flags a byte-cap stop; a window end takes back a pass; runbook: a new run after a long outage 2026-10-01 04:42:02 +00:00
admission.rs TASK-01 round-2 notes: saves reach the writer on a failed step and on pause, every save outcome reported, sugar admission atomic with the commit 2026-09-30 01:30:56 +00:00
composition.rs Merge port/serve-01 (SERVE-01) into v0.7.0 release candidate 2026-09-30 10:06:03 +00:00
driver.rs fly-legacy-session: pokered-macros-v1 on the session framework (TASK-01) 2026-09-29 18:03:59 +00:00
import.rs Merge port/task-01 (TASK-01 review fixes) into port/serve-01 2026-09-29 21:29:31 +00:00
lib.rs Merge port/shadow-01 (SHADOW-01) into v0.7.0 release candidate 2026-09-30 10:09:01 +00:00
service.rs session: pin the sweep workers one per cpu in flysim-session (PERF-02) 2026-10-01 12:16:59 +00:00
task.rs Merge port/shadow-01 (SHADOW-01) into v0.7.0 release candidate 2026-09-30 10:09:01 +00:00
trace.rs fly-legacy-session: the shadow run, its comparator and verdict (SHADOW-01) 2026-09-30 01:39:42 +00:00