Add helper method to probe kernel for io-uring for IO operation
Author: Daksh14Created Sep 9, 2026Updated Sep 17, 2026
LabelsA-tokioT-io-uring
Version tokio unstable io uring 1.53
Platform linux 4.0 and above
After the recent changes in the PR #8165, there's an IF statement that's used before every IO method to check
- Current Handle runtime exists
- if IO driver is enabled in the runtime driver
- If the IO operation is available in the kernel by probing and checking its io_uring opcode.
Try to put this condition in a helper statement in the Handle or Handle.driver` to make the condition readable easily and not have multiple if statement check before each IO operation.
To not have the 3rd probe check, initialize io-uring before calling iopath in the driver
This also includes setting up io-uring in a way where rings are initialized during the runtime creation
Source: tokio-rs/tokio