Repository navigation
perf(io_uring): add fixed-fd registration, SQPOLL, and zero-copy flush - #2502
Merged
Merged
Conversation
- Register file descriptors via IORING_REGISTER_FILES at open time, eliminating per-op file table lookups (~50ns/SQE on high-fd processes) - Add IORING_SETUP_SQPOLL support with automatic fallback when CAP_SYS_NICE is unavailable - Eliminate flush_buffer() heap allocation by passing the internal buffer slice directly to the batched writer instead of to_vec() - Update writer_from_file() to use build_ring() and try_register_fd() for consistent feature support across all writer construction paths - Keep stub API in sync with new IoUringConfig fields
…used mut Split chained IoUring::builder().setup_sqpoll() call to avoid E0716 temporary lifetime error, and remove unnecessary mut on ring bindings since submitter() only requires &self.
Add register_files, sqpoll, and sqpoll_idle_ms to 6 test config initializers that are only compiled on Linux with #[cfg(test)].
oferchen
added a commit
that referenced
this pull request
May 1, 2026
#2502) * perf(io_uring): add fixed-fd registration, SQPOLL, and zero-copy flush - Register file descriptors via IORING_REGISTER_FILES at open time, eliminating per-op file table lookups (~50ns/SQE on high-fd processes) - Add IORING_SETUP_SQPOLL support with automatic fallback when CAP_SYS_NICE is unavailable - Eliminate flush_buffer() heap allocation by passing the internal buffer slice directly to the batched writer instead of to_vec() - Update writer_from_file() to use build_ring() and try_register_fd() for consistent feature support across all writer construction paths - Keep stub API in sync with new IoUringConfig fields * fix(io_uring): fix Linux compilation errors for SQPOLL builder and unused mut Split chained IoUring::builder().setup_sqpoll() call to avoid E0716 temporary lifetime error, and remove unnecessary mut on ring bindings since submitter() only requires &self. * fix(io_uring): add missing fields to all test IoUringConfig initializers Add register_files, sqpoll, and sqpoll_idle_ms to 6 test config initializers that are only compiled on Linux with #[cfg(test)].
oferchen
added a commit
that referenced
this pull request
May 5, 2026
#2502) * perf(io_uring): add fixed-fd registration, SQPOLL, and zero-copy flush - Register file descriptors via IORING_REGISTER_FILES at open time, eliminating per-op file table lookups (~50ns/SQE on high-fd processes) - Add IORING_SETUP_SQPOLL support with automatic fallback when CAP_SYS_NICE is unavailable - Eliminate flush_buffer() heap allocation by passing the internal buffer slice directly to the batched writer instead of to_vec() - Update writer_from_file() to use build_ring() and try_register_fd() for consistent feature support across all writer construction paths - Keep stub API in sync with new IoUringConfig fields * fix(io_uring): fix Linux compilation errors for SQPOLL builder and unused mut Split chained IoUring::builder().setup_sqpoll() call to avoid E0716 temporary lifetime error, and remove unnecessary mut on ring bindings since submitter() only requires &self. * fix(io_uring): add missing fields to all test IoUringConfig initializers Add register_files, sqpoll, and sqpoll_idle_ms to 6 test config initializers that are only compiled on Linux with #[cfg(test)].
3 tasks
oferchen
added a commit
that referenced
this pull request
May 21, 2026
Adds the end-to-end production-path bench harness for the parallel- receive-delta promotion chain. PIP-6 is the third bench in the sequence after BR-3i.f (#2502, apply-loop) and BR-3j.f (#2508, post-DashMap re-bench). Scope: drives a real oc-rsync client against a real oc-rsync daemon over rsync:// loopback, on workload shapes calibrated to the Path B dispatch boundary (file_count > 100 || total_size > 64 MiB) that PIP-3+5 (PR #4666) wired into ReceiverContext::dispatch_receiver_strategy. Comparison shape: same workload, two oc-rsync binaries (default-features build vs --no-default-features --features 'zstd lz4 xattr iconv'). The no-parallel build trips the parallel_unavailable fallback path in crates/transfer/src/receiver/mod.rs and always picks sequential. Workload matrix: - single_large_file (1x1 GiB, parallel by byte threshold) - many_small_files (10_000x4 KiB, parallel by count) - boundary_under (50 files, 32 MiB, sequential control) - boundary_over (200 files, 32 MiB, parallel above count) - mixed_directory (1_000 files, ~600 MiB, parallel) Decision criteria: - Win on >= 2 of 5 shapes (parallel_wall / sequential_wall <= 0.9) - No shape regresses by more than 5% - boundary_under within +/-3% (harness control) Bench compiles; numbers capture is the follow-up. The section-4 table in docs/design/parallel-receive-delta-default-on.md is the target for the wall-clock data.
oferchen
added a commit
that referenced
this pull request
May 21, 2026
…#4679) Adds the end-to-end production-path bench harness for the parallel- receive-delta promotion chain. PIP-6 is the third bench in the sequence after BR-3i.f (#2502, apply-loop) and BR-3j.f (#2508, post-DashMap re-bench). Scope: drives a real oc-rsync client against a real oc-rsync daemon over rsync:// loopback, on workload shapes calibrated to the Path B dispatch boundary (file_count > 100 || total_size > 64 MiB) that PIP-3+5 (PR #4666) wired into ReceiverContext::dispatch_receiver_strategy. Comparison shape: same workload, two oc-rsync binaries (default-features build vs --no-default-features --features 'zstd lz4 xattr iconv'). The no-parallel build trips the parallel_unavailable fallback path in crates/transfer/src/receiver/mod.rs and always picks sequential. Workload matrix: - single_large_file (1x1 GiB, parallel by byte threshold) - many_small_files (10_000x4 KiB, parallel by count) - boundary_under (50 files, 32 MiB, sequential control) - boundary_over (200 files, 32 MiB, parallel above count) - mixed_directory (1_000 files, ~600 MiB, parallel) Decision criteria: - Win on >= 2 of 5 shapes (parallel_wall / sequential_wall <= 0.9) - No shape regresses by more than 5% - boundary_under within +/-3% (harness control) Bench compiles; numbers capture is the follow-up. The section-4 table in docs/design/parallel-receive-delta-default-on.md is the target for the wall-clock data.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…#4679) Adds the end-to-end production-path bench harness for the parallel- receive-delta promotion chain. PIP-6 is the third bench in the sequence after BR-3i.f (#2502, apply-loop) and BR-3j.f (#2508, post-DashMap re-bench). Scope: drives a real oc-rsync client against a real oc-rsync daemon over rsync:// loopback, on workload shapes calibrated to the Path B dispatch boundary (file_count > 100 || total_size > 64 MiB) that PIP-3+5 (PR #4666) wired into ReceiverContext::dispatch_receiver_strategy. Comparison shape: same workload, two oc-rsync binaries (default-features build vs --no-default-features --features 'zstd lz4 xattr iconv'). The no-parallel build trips the parallel_unavailable fallback path in crates/transfer/src/receiver/mod.rs and always picks sequential. Workload matrix: - single_large_file (1x1 GiB, parallel by byte threshold) - many_small_files (10_000x4 KiB, parallel by count) - boundary_under (50 files, 32 MiB, sequential control) - boundary_over (200 files, 32 MiB, parallel above count) - mixed_directory (1_000 files, ~600 MiB, parallel) Decision criteria: - Win on >= 2 of 5 shapes (parallel_wall / sequential_wall <= 0.9) - No shape regresses by more than 5% - boundary_under within +/-3% (harness control) Bench compiles; numbers capture is the follow-up. The section-4 table in docs/design/parallel-receive-delta-default-on.md is the target for the wall-clock data.
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
IORING_REGISTER_FILESfd registration at open time, eliminating per-op file table lookups in the kernel (~50ns/SQE savings on high-fd processes)IORING_SETUP_SQPOLLkernel polling support with automatic privilege-based fallbackflush_buffer()heap allocation by passing buffer slice directly to batched writer (wasto_vec()clone)writer_from_file()to usebuild_ring()andtry_register_fd()for consistent feature supportIoUringConfigfields (register_files,sqpoll,sqpoll_idle_ms)Test plan
cargo fmt --all -- --checkpassesRUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --all-features --no-depspassesfast_iotests pass