Skip to content

Add setup_no_sqarray builder method#384

Open
nitsky wants to merge 2 commits intotokio-rs:masterfrom
tangramdotdev:setup-no-sqarray
Open

Add setup_no_sqarray builder method#384
nitsky wants to merge 2 commits intotokio-rs:masterfrom
tangramdotdev:setup-no-sqarray

Conversation

@nitsky
Copy link

@nitsky nitsky commented Feb 12, 2026

This PR adds a setup_no_sqarray builder method to enable IORING_SETUP_NO_SQARRAY. This was done with the assistance of Claude.

nitsky and others added 2 commits February 11, 2026 19:47
This exposes `IORING_SETUP_NO_SQARRAY` (available since Linux 6.6) which
removes the SQ index array indirection, eliminating a memory read per
submission.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When IORING_SETUP_NO_SQARRAY is set, the kernel sets sq_off.array to 0.
The SQ array initialization loop was writing to offset 0 of the SQ mmap,
corrupting the ring header (sq_head, sq_tail, etc.). Skip the array
initialization when NO_SQARRAY is set since the kernel consumes SQEs
directly by ring index.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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