Skip to content

Guard env mutations in fallback tests - #2243

Merged
oferchen merged 1 commit into
masterfrom
map-and-log-rsync-parity-gaps
Nov 24, 2025
Merged

oferchen merged 1 commit into
masterfrom
map-and-log-rsync-parity-gaps

Conversation

@oferchen

@oferchen oferchen commented Nov 24, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • add dedicated helpers to wrap unsafe environment mutations used by fallback cache tests
  • document synchronization assumptions so env changes remain scoped to the per-test guards

Testing

  • cargo test -p core fallback_binary -- --quiet

[Codex Task](

@oferchen
oferchen merged commit d96fe86 into master Nov 24, 2025
@oferchen
oferchen deleted the map-and-log-rsync-parity-gaps branch November 24, 2025 23:38
oferchen added a commit that referenced this pull request May 1, 2026
oferchen added a commit that referenced this pull request May 17, 2026
…4220)

Document the trade-offs for pushing io_uring SQEs from rayon worker
threads. Records current submission topology, per-worker hazards,
the single-submitter alternative, missing bench evidence, and a
recommendation to defer until #2243 (per-thread rings) and #4197
(per-file vs shared ring bench) converge.
oferchen added a commit that referenced this pull request May 17, 2026
Rewrite the session-ring-pool design doc around the daemon-session
framing: pool keyed by SessionId, lazy init, max-size and idle eviction,
hazards around kernel-object lifetime and registered-fd reuse, and a
bench plan that isolates session-startup latency. Recommend deferring
implementation until #2243 (per-thread rings) lands so the pool layer
does not inherit the SharedRing Arc<Mutex<RawIoUring>> bottleneck noted
in #1876.
oferchen added a commit that referenced this pull request May 17, 2026
Records the per-thread rings + work-stealing design space and
recommends deferring implementation until the per-file vs shared
ring bench harness exposes a shared+Mutex baseline row. Captures
why cross-ring SQE stealing is not feasible without demoting to
the unregistered fast path or reintroducing the mutex the design
is meant to avoid.
oferchen added a commit that referenced this pull request May 17, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request May 17, 2026
Adds a per-thread io_uring ring primitive next to the existing
SessionRingPool. Each calling thread lazily builds its own ring on
first acquire and holds it in thread-local storage, so the submit
and reap paths hold no lock.

- ThreadLocalRingPool, ThreadLocalRingLease in fast_io::io_uring.
- Stub mirrors on non-Linux so cross-platform call sites compile.
- Six unit tests covering same-thread fd reuse, distinct rings per
  thread, reentrant acquire rejection, two pools sharing a thread,
  clone sharing per-thread state, and setup-failure fallback.
- Design note updated to mark the primitive as implemented and to
  record why work stealing was rejected (stolen SQEs cannot use
  the owning ring's registered buffers or fixed-file table).

Existing SharedRing and per-file ring consumers (file_writer,
file_reader, disk_batch, registered_buffers) keep their current
single-owner shape. Migrating those consumers is gated on the bench
grid in docs/design/iouring-per-thread-rings.md section 5.
oferchen added a commit that referenced this pull request May 18, 2026
…4220)

Document the trade-offs for pushing io_uring SQEs from rayon worker
threads. Records current submission topology, per-worker hazards,
the single-submitter alternative, missing bench evidence, and a
recommendation to defer until #2243 (per-thread rings) and #4197
(per-file vs shared ring bench) converge.
oferchen added a commit that referenced this pull request May 18, 2026
Rewrite the session-ring-pool design doc around the daemon-session
framing: pool keyed by SessionId, lazy init, max-size and idle eviction,
hazards around kernel-object lifetime and registered-fd reuse, and a
bench plan that isolates session-startup latency. Recommend deferring
implementation until #2243 (per-thread rings) lands so the pool layer
does not inherit the SharedRing Arc<Mutex<RawIoUring>> bottleneck noted
in #1876.
oferchen added a commit that referenced this pull request May 18, 2026
Records the per-thread rings + work-stealing design space and
recommends deferring implementation until the per-file vs shared
ring bench harness exposes a shared+Mutex baseline row. Captures
why cross-ring SQE stealing is not feasible without demoting to
the unregistered fast path or reintroducing the mutex the design
is meant to avoid.
oferchen added a commit that referenced this pull request May 18, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request May 18, 2026
Adds a per-thread io_uring ring primitive next to the existing
SessionRingPool. Each calling thread lazily builds its own ring on
first acquire and holds it in thread-local storage, so the submit
and reap paths hold no lock.

- ThreadLocalRingPool, ThreadLocalRingLease in fast_io::io_uring.
- Stub mirrors on non-Linux so cross-platform call sites compile.
- Six unit tests covering same-thread fd reuse, distinct rings per
  thread, reentrant acquire rejection, two pools sharing a thread,
  clone sharing per-thread state, and setup-failure fallback.
- Design note updated to mark the primitive as implemented and to
  record why work stealing was rejected (stolen SQEs cannot use
  the owning ring's registered buffers or fixed-file table).

Existing SharedRing and per-file ring consumers (file_writer,
file_reader, disk_batch, registered_buffers) keep their current
single-owner shape. Migrating those consumers is gated on the bench
grid in docs/design/iouring-per-thread-rings.md section 5.
oferchen added a commit that referenced this pull request May 18, 2026
…4220)

Document the trade-offs for pushing io_uring SQEs from rayon worker
threads. Records current submission topology, per-worker hazards,
the single-submitter alternative, missing bench evidence, and a
recommendation to defer until #2243 (per-thread rings) and #4197
(per-file vs shared ring bench) converge.
oferchen added a commit that referenced this pull request May 18, 2026
Rewrite the session-ring-pool design doc around the daemon-session
framing: pool keyed by SessionId, lazy init, max-size and idle eviction,
hazards around kernel-object lifetime and registered-fd reuse, and a
bench plan that isolates session-startup latency. Recommend deferring
implementation until #2243 (per-thread rings) lands so the pool layer
does not inherit the SharedRing Arc<Mutex<RawIoUring>> bottleneck noted
in #1876.
oferchen added a commit that referenced this pull request May 18, 2026
Records the per-thread rings + work-stealing design space and
recommends deferring implementation until the per-file vs shared
ring bench harness exposes a shared+Mutex baseline row. Captures
why cross-ring SQE stealing is not feasible without demoting to
the unregistered fast path or reintroducing the mutex the design
is meant to avoid.
oferchen added a commit that referenced this pull request May 18, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request May 18, 2026
Adds a per-thread io_uring ring primitive next to the existing
SessionRingPool. Each calling thread lazily builds its own ring on
first acquire and holds it in thread-local storage, so the submit
and reap paths hold no lock.

- ThreadLocalRingPool, ThreadLocalRingLease in fast_io::io_uring.
- Stub mirrors on non-Linux so cross-platform call sites compile.
- Six unit tests covering same-thread fd reuse, distinct rings per
  thread, reentrant acquire rejection, two pools sharing a thread,
  clone sharing per-thread state, and setup-failure fallback.
- Design note updated to mark the primitive as implemented and to
  record why work stealing was rejected (stolen SQEs cannot use
  the owning ring's registered buffers or fixed-file table).

Existing SharedRing and per-file ring consumers (file_writer,
file_reader, disk_batch, registered_buffers) keep their current
single-owner shape. Migrating those consumers is gated on the bench
grid in docs/design/iouring-per-thread-rings.md section 5.
oferchen added a commit that referenced this pull request Aug 24, 2026
…4220)

Document the trade-offs for pushing io_uring SQEs from rayon worker
threads. Records current submission topology, per-worker hazards,
the single-submitter alternative, missing bench evidence, and a
recommendation to defer until #2243 (per-thread rings) and #4197
(per-file vs shared ring bench) converge.
oferchen added a commit that referenced this pull request Aug 24, 2026
Rewrite the session-ring-pool design doc around the daemon-session
framing: pool keyed by SessionId, lazy init, max-size and idle eviction,
hazards around kernel-object lifetime and registered-fd reuse, and a
bench plan that isolates session-startup latency. Recommend deferring
implementation until #2243 (per-thread rings) lands so the pool layer
does not inherit the SharedRing Arc<Mutex<RawIoUring>> bottleneck noted
in #1876.
oferchen added a commit that referenced this pull request Aug 24, 2026
Records the per-thread rings + work-stealing design space and
recommends deferring implementation until the per-file vs shared
ring bench harness exposes a shared+Mutex baseline row. Captures
why cross-ring SQE stealing is not feasible without demoting to
the unregistered fast path or reintroducing the mutex the design
is meant to avoid.
oferchen added a commit that referenced this pull request Aug 24, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request Aug 24, 2026
Adds a per-thread io_uring ring primitive next to the existing
SessionRingPool. Each calling thread lazily builds its own ring on
first acquire and holds it in thread-local storage, so the submit
and reap paths hold no lock.

- ThreadLocalRingPool, ThreadLocalRingLease in fast_io::io_uring.
- Stub mirrors on non-Linux so cross-platform call sites compile.
- Six unit tests covering same-thread fd reuse, distinct rings per
  thread, reentrant acquire rejection, two pools sharing a thread,
  clone sharing per-thread state, and setup-failure fallback.
- Design note updated to mark the primitive as implemented and to
  record why work stealing was rejected (stolen SQEs cannot use
  the owning ring's registered buffers or fixed-file table).

Existing SharedRing and per-file ring consumers (file_writer,
file_reader, disk_batch, registered_buffers) keep their current
single-owner shape. Migrating those consumers is gated on the bench
grid in docs/design/iouring-per-thread-rings.md section 5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant