[Async] Gracefully degrade io_uring slab registration on RLIMIT_MEMLOCK#23654
Merged
[Async] Gracefully degrade io_uring slab registration on RLIMIT_MEMLOCK#23654
Conversation
When IORING_REGISTER_BUFFERS[_UPDATE] fails with ENOMEM (kernel cannot pin pages due to RLIMIT_MEMLOCK), fall back to copy-based I/O instead of returning a hard error. The region is still created with full pool management support, but the send path uses regular sends instead of SEND_ZC with fixed buffer indices. This fixes a flake on arm64 CI runners where RLIMIT_MEMLOCK is too low for the 1MB buffer registration in ZeroCopySendRegisteredLargeTransfer. Changes: - region.h: base_buffer_index changed from uint16_t to int16_t with -1 sentinel (mirrors existing buffer_group_id pattern) - proactor_registration.c: ENOMEM triggers a Tracy WARNING and returns ok instead of capturing a stack trace via iree_make_status; non-ENOMEM errors (EINVAL, EFAULT) still fail hard - proactor_submit.c: send eligibility check bails on base_buffer_index < 0, falling back to copy-based send ci-extra: all Co-Authored-By: Claude <[email protected]>
ba92a5e to
ecb19da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When IORING_REGISTER_BUFFERS[_UPDATE] fails with ENOMEM (kernel cannot pin pages due to RLIMIT_MEMLOCK), fall back to copy-based I/O instead of returning a hard error. The region is still created with full pool management support, but the send path uses regular sends instead of SEND_ZC with fixed buffer indices.
This fixes a flake on arm64 CI runners where RLIMIT_MEMLOCK is too low for the 1MB buffer registration in ZeroCopySendRegisteredLargeTransfer.
ci-extra: all