Skip to content

Harden io_uring submit and park against CQ-overflow backpressure#81

Merged
vadimskipin merged 1 commit into
mainfrom
vskipin/fix-uring
Jun 18, 2026
Merged

Harden io_uring submit and park against CQ-overflow backpressure#81
vadimskipin merged 1 commit into
mainfrom
vskipin/fix-uring

Conversation

@vadimskipin

Copy link
Copy Markdown
Collaborator

Under IORING_FEAT_NODROP the kernel returns EBUSY when the CQ is full of unreaped completions - the same overflow that terminates the doorbell multishot. submitIoSlow asserted submit >= 0 and aborted; defer instead, leaving the SQEs queued and lastSubmitCycles stale so the service loop drains the CQ, re-submits, and the staleness gate retries. Allow EBUSY in parkThread's enter2 assert too.

Also: count IO_ENQUEUED by what submit consumed, not pre-submit sq_ready; and assert one-shot completions so a future multishot IO op trips instead of double-completing.

Under IORING_FEAT_NODROP the kernel returns EBUSY when the CQ is full of unreaped
completions - the same overflow that terminates the doorbell multishot. submitIoSlow
asserted submit >= 0 and aborted; defer instead, leaving the SQEs queued and
lastSubmitCycles stale so the service loop drains the CQ, re-submits, and the
staleness gate retries. Allow EBUSY in parkThread's enter2 assert too.

Also: count IO_ENQUEUED by what submit consumed, not pre-submit sq_ready; and assert
one-shot completions so a future multishot IO op trips instead of double-completing.
@vadimskipin vadimskipin merged commit 56927f4 into main Jun 18, 2026
14 checks passed
@vadimskipin vadimskipin deleted the vskipin/fix-uring branch June 18, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant