Skip to content

feat: wire try_io_uring_copy as fallback in copy_file_contents - #2973

Merged
oferchen merged 1 commit into
masterfrom
feat/io-uring-copy-fallback
Mar 22, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/io-uring-copy-fallback

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add try_io_uring_copy as the first tier in the file copy fallback chain
  • Creates a temporary io_uring ring and alternates read/write SQE submissions
  • Gated with cfg(all(target_os = linux, feature = io_uring)) with stub on other platforms

Fallback chain

  1. io_uring batched read/write - Linux 5.6+, files >= 256KB
  2. copy_file_range zero-copy - Linux 4.5+, files >= 64KB
  3. Standard buffered read/write - all platforms

Test plan

  • CI passes on all platforms (Linux, macOS, Windows)
  • test_try_io_uring_copy_linux verifies correctness on Linux
  • test_try_io_uring_copy_stub verifies stub returns Unsupported
  • test_buffered_copy_above_io_uring_threshold verifies end-to-end
  • Existing copy tests continue to pass

@github-actions github-actions Bot added the enhancement New feature or request label Mar 22, 2026
@oferchen
oferchen merged commit 9623955 into master Mar 22, 2026
12 of 17 checks passed
@oferchen
oferchen deleted the feat/io-uring-copy-fallback branch March 22, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant