Skip to content

docs(design): macOS kqueue-based fast I/O path - #3813

Merged
oferchen merged 1 commit into
masterfrom
docs/macos-kqueue-design-1385
May 7, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/macos-kqueue-design-1385

Conversation

@oferchen

@oferchen oferchen commented May 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Tight-scope design note for task Adjust CI coverage gate and extend cross-platform builds #1385.
  • Surveys current macOS I/O paths in crates/fast_io/src/ (clonefile, fcopyfile, sendfile fallback, missing async disk path).
  • Scopes kqueue to its actual surface (EVFILT_READ/WRITE/VNODE/TIMER/USER) and records that it is a notification-only primitive, not an I/O submission interface.
  • Identifies the disk-commit thread as the primary replacement site for blocking write(2); daemon listener as a secondary multiplex candidate; rejects directory walk and SSH stdio.
  • Compares kqueue to Linux io_uring across submission cost, zero-copy, polled mode, fixed buffers, and per-fd batching to set expectations.
  • Recommends kqueue (not dispatch_io) as the macOS implementation of the AsyncFileWriter trait from Refactor module list client into modular structure #1655, and treats F_NOCACHE plus writev (Fix IPv6 zone identifier parsing in module list requests #1657) as a complement rather than an alternative.

This replaces the prior, longer note with a leaner version focused on the five points above.

Test plan

  • cargo fmt --all -- --check
  • Markdown links resolve to real files in docs/design/, docs/audits/, and crates/fast_io/src/.
  • CI passes (docs-only change; no Rust compilation impact expected).

Tight-scope design note for #1385: surveys current macOS I/O paths in
fast_io, scopes the kqueue surface to vnode/socket/timer events,
identifies disk-commit and daemon socket I/O as the candidate sites,
contrasts kqueue's notification-only role with io_uring's submission
plus completion model, and recommends kqueue (not dispatch_io) as the
macOS implementation of the AsyncFileWriter trait from #1655.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 7, 2026
@oferchen
oferchen merged commit e674406 into master May 7, 2026
8 checks passed
@oferchen
oferchen deleted the docs/macos-kqueue-design-1385 branch May 8, 2026 03:52
oferchen added a commit that referenced this pull request May 18, 2026
Tight-scope design note for #1385: surveys current macOS I/O paths in
fast_io, scopes the kqueue surface to vnode/socket/timer events,
identifies disk-commit and daemon socket I/O as the candidate sites,
contrasts kqueue's notification-only role with io_uring's submission
plus completion model, and recommends kqueue (not dispatch_io) as the
macOS implementation of the AsyncFileWriter trait from #1655.
oferchen added a commit that referenced this pull request Aug 24, 2026
Tight-scope design note for #1385: surveys current macOS I/O paths in
fast_io, scopes the kqueue surface to vnode/socket/timer events,
identifies disk-commit and daemon socket I/O as the candidate sites,
contrasts kqueue's notification-only role with io_uring's submission
plus completion model, and recommends kqueue (not dispatch_io) as the
macOS implementation of the AsyncFileWriter trait from #1655.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant