Skip to content

docs(audits): document mmap basis files under io_uring SQPOLL (#1661) - #3695

Merged
oferchen merged 1 commit into
masterfrom
docs/io-uring-sqpoll-mmap-1661
May 5, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/io-uring-sqpoll-mmap-1661

Conversation

@oferchen

@oferchen oferchen commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • New audit at docs/audits/io_uring_sqpoll_mmap_pagefault.md (442 lines) covering how mmap'd basis files interact with the io_uring SQPOLL kernel thread (Fix clippy needless return in connect program formatter #1661).
  • Inventories every mmap producer and io_uring submission site with file:LINE citations across crates/fast_io/src/io_uring/, crates/transfer/src/map_file/, crates/transfer/src/delta_apply/, and crates/checksums/src/parallel/.
  • Explains the three SQPOLL fault outcomes (in-kthread stall, io-wq punt, short/-EFAULT) against io_sq_thread(), io_issue_sqe(), handle_mm_fault(), and kthread_use_mm().
  • Records the four layered mitigations: MAP_POPULATE rejected (Expose internal client helpers for testing #1663), MADV_WILLNEED kept (Fix client helper visibility for tests #1662), registered-buffer pre-fault loop (Modularize local copy overrides and streamline cross builds #1665), and the BufferedMap-when-io_uring invariant (Refactor client tests into modules #1666).
  • Surfaces four residual gaps the existing mitigations do not close: transparent-hugepage NUMA migrations, MMU notifier teardown ordering against a future IoUringWriter that owns an MmapReader, the parallel-checksum truncate-SIGBUS race that has no handler today, and O_DIRECT-alignment under SQPOLL.
  • Proposes test additions beyond Ensure cross jobs install Rust targets #1664: NUMA-migration reproducer, drop-order regression scaffolding, parallel-checksum truncate test, SQPOLL-fallback assertion, and a clippy::disallowed_methods static lint pinning the BufferedMap invariant.

Test plan

  • Docs-only change, no code touched - no test execution required.
  • Verified all referenced file paths and line numbers against origin/master HEAD.
  • Confirmed no em-dashes or AI tooling references.
  • Length 442 lines (within 250-450 target).
  • Section structure matches task brief: Methodology, Where mmap meets io_uring, SQPOLL behaviour, Current mitigations, Gaps, Recommendation, Test surface, References.

Long-form follow-up to the SQPOLL page-fault hazard audit (#1661):
walks the mmap and io_uring submission sites, explains the kthread
fault behaviour against kernel sources, and records the layered
mitigations (MAP_POPULATE rejected per #1663, MADV_WILLNEED kept per
#1662, registered-buffer prefault per #1665, BufferedMap-when-io_uring
policy per #1666). Lists residual gaps (THP NUMA migration, MMU
notifier teardown, parallel-checksum truncate race, O_DIRECT
alignment) and proposes targeted tests beyond #1664.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 5, 2026
@oferchen
oferchen merged commit e95cb7d into master May 5, 2026
8 checks passed
@oferchen
oferchen deleted the docs/io-uring-sqpoll-mmap-1661 branch May 6, 2026 18:57
oferchen added a commit that referenced this pull request May 18, 2026
…#3695)

Long-form follow-up to the SQPOLL page-fault hazard audit (#1661):
walks the mmap and io_uring submission sites, explains the kthread
fault behaviour against kernel sources, and records the layered
mitigations (MAP_POPULATE rejected per #1663, MADV_WILLNEED kept per
#1662, registered-buffer prefault per #1665, BufferedMap-when-io_uring
policy per #1666). Lists residual gaps (THP NUMA migration, MMU
notifier teardown, parallel-checksum truncate race, O_DIRECT
alignment) and proposes targeted tests beyond #1664.
oferchen added a commit that referenced this pull request Aug 24, 2026
…#3695)

Long-form follow-up to the SQPOLL page-fault hazard audit (#1661):
walks the mmap and io_uring submission sites, explains the kthread
fault behaviour against kernel sources, and records the layered
mitigations (MAP_POPULATE rejected per #1663, MADV_WILLNEED kept per
#1662, registered-buffer prefault per #1665, BufferedMap-when-io_uring
policy per #1666). Lists residual gaps (THP NUMA migration, MMU
notifier teardown, parallel-checksum truncate race, O_DIRECT
alignment) and proposes targeted tests beyond #1664.
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