Skip to content

docs(design): io_uring ASYNC_CANCEL for inflight SQE cancellation (#2205) - #4227

Merged
oferchen merged 1 commit into
masterfrom
docs/iouring-async-cancel-design-2205
May 17, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/iouring-async-cancel-design-2205

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Documents whether io_uring helpers issue IORING_OP_ASYNC_CANCEL when a transfer aborts mid-flight, and what would have to change for it to be wired.
  • Captures the current synchronous submit + wait + drain pattern across every io_uring helper (file_writer, file_reader, disk_batch, batching, registered_buffers, linkat, renameat2, shared_ring) and shows that no in-flight SQE outlives the caller's stack frame today.
  • Recommends deferring the work until either the async io_uring path (docs(design): async daemon impact on io_uring integration (#1595) #4217), per-thread rings (Guard env mutations in fallback tests #2243), or an actual abort-leak bug report appears with a reproducer.

Test plan

)

Document the current io_uring abort path, ASYNC_CANCEL semantics, a wiring
sketch, the completion-vs-cancel race, verification strategy, and the
recommendation to defer until either async io_uring lands or an abort-leak
bug is reported. Every helper today follows submit + wait + drain inside a
single function, so no in-flight SQE outlives the caller's stack frame and
there is nothing to cancel under the present architecture.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 17, 2026
@oferchen
oferchen merged commit f266cc6 into master May 17, 2026
8 checks passed
oferchen added a commit that referenced this pull request May 18, 2026
) (#4227)

Document the current io_uring abort path, ASYNC_CANCEL semantics, a wiring
sketch, the completion-vs-cancel race, verification strategy, and the
recommendation to defer until either async io_uring lands or an abort-leak
bug is reported. Every helper today follows submit + wait + drain inside a
single function, so no in-flight SQE outlives the caller's stack frame and
there is nothing to cancel under the present architecture.
oferchen added a commit that referenced this pull request May 18, 2026
) (#4227)

Document the current io_uring abort path, ASYNC_CANCEL semantics, a wiring
sketch, the completion-vs-cancel race, verification strategy, and the
recommendation to defer until either async io_uring lands or an abort-leak
bug is reported. Every helper today follows submit + wait + drain inside a
single function, so no in-flight SQE outlives the caller's stack frame and
there is nothing to cancel under the present architecture.
@oferchen
oferchen deleted the docs/iouring-async-cancel-design-2205 branch May 19, 2026 19:27
oferchen added a commit that referenced this pull request Aug 24, 2026
) (#4227)

Document the current io_uring abort path, ASYNC_CANCEL semantics, a wiring
sketch, the completion-vs-cancel race, verification strategy, and the
recommendation to defer until either async io_uring lands or an abort-leak
bug is reported. Every helper today follows submit + wait + drain inside a
single function, so no in-flight SQE outlives the caller's stack frame and
there is nothing to cancel under the present architecture.
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