Skip to content

docs(engine): evaluate io_uring batching for disk commit path - #3439

Merged
oferchen merged 1 commit into
masterfrom
docs/iouring-disk-commit-audit
Apr 29, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/iouring-disk-commit-audit

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds docs/audits/disk-commit-iouring-batching.md evaluating io_uring batching for the disk commit thread (task Add RSYNC_CONNECT_PROG support for module listings #1086).
  • Maps the current per-file syscall sequence (open -> write* -> optional fsync -> close -> rename/linkat) and identifies that IoUringDiskBatch is allocated in disk_thread_main but never plumbed into process_file / process_whole_file.
  • Compares per-file IOSQE_IO_LINK chains vs cross-file batching, quantifies the syscall savings (3-5 -> 2 per file in the temp+rename path), and enumerates risks: partial chain failure, --inplace set_len having no opcode, --partial-dir EXDEV, O_TMPFILE + linkat(AT_SYMLINK_FOLLOW) semantics under io_uring, and per-opcode kernel probing (RENAMEAT 5.11+, LINKAT 5.15+).
  • Recommends prototype-first with six numbered next steps (per-opcode probe, commit_chain helper, criterion bench, gated wiring, buffer-lifetime fix, log-line correctness) and a >=15% user-CPU reduction gate on the small-file no-fsync scenario before any merge.

Test plan

  • Reviewers verify the cited file:line references match the current code.
  • Reviewers sanity-check the kernel-version requirements (5.6 / 5.11 / 5.15) against the io-uring 0.7 crate API.
  • No code changes; documentation only - existing CI suffices.

Audit the disk-commit thread's per-file syscall sequence, the existing
fast_io io_uring infrastructure, and the feasibility of using
IOSQE_IO_LINK to chain write -> fsync -> rename per file (and across
files). Identifies that IoUringDiskBatch is allocated but never wired
into process_file, that RENAMEAT (5.11+) and LINKAT (5.15+) opcodes are
not yet plumbed in fast_io, and lays out a prototype-first plan with
six concrete next steps and a benchmark gate.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 29, 2026
@oferchen
oferchen merged commit 48e0f7f into master Apr 29, 2026
12 checks passed
@oferchen
oferchen deleted the docs/iouring-disk-commit-audit branch April 29, 2026 10:21
oferchen added a commit that referenced this pull request May 1, 2026
…#3439)

Audit the disk-commit thread's per-file syscall sequence, the existing
fast_io io_uring infrastructure, and the feasibility of using
IOSQE_IO_LINK to chain write -> fsync -> rename per file (and across
files). Identifies that IoUringDiskBatch is allocated but never wired
into process_file, that RENAMEAT (5.11+) and LINKAT (5.15+) opcodes are
not yet plumbed in fast_io, and lays out a prototype-first plan with
six concrete next steps and a benchmark gate.
oferchen added a commit that referenced this pull request May 5, 2026
…#3439)

Audit the disk-commit thread's per-file syscall sequence, the existing
fast_io io_uring infrastructure, and the feasibility of using
IOSQE_IO_LINK to chain write -> fsync -> rename per file (and across
files). Identifies that IoUringDiskBatch is allocated but never wired
into process_file, that RENAMEAT (5.11+) and LINKAT (5.15+) opcodes are
not yet plumbed in fast_io, and lays out a prototype-first plan with
six concrete next steps and a benchmark gate.
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