pub struct UringCfg {
pub coop_taskrun: bool,
pub defer_taskrun: bool,
pub iopoll: bool,
pub sqpoll: Option<u32>,
}Expand description
Configuration options for io_uring initialization.
These are advanced options that affect io_uring behavior. Most users should use UringCfg::default(). Incorrect configuration may cause EINVAL errors or degraded performance.
§Kernel Requirements
Some options require specific kernel versions or capabilities:
coop_taskrun: Linux 5.19+defer_taskrun: Linux 6.1+sqpoll: RequiresCAP_SYS_NICEcapabilityiopoll: Only works with O_DIRECT files on supported filesystems
Fields§
§coop_taskrun: boolEnable cooperative task running (Linux 5.19+). When enabled, the kernel will only process completions when the application explicitly asks for them, reducing overhead.
defer_taskrun: boolEnable deferred task running (Linux 6.1+). Similar to coop_taskrun but with additional deferral. Requires coop_taskrun to also be set.
iopoll: boolEnable I/O polling mode. When enabled, the kernel will poll for completions instead of using interrupts. Only works with O_DIRECT files on supported filesystems. Can provide lower latency but uses more CPU.
sqpoll: Option<u32>Enable submission queue polling with the given idle timeout in milliseconds. When enabled, a kernel thread will poll the submission queue, eliminating the need for system calls to submit I/O. The thread will go to sleep after being idle for the specified duration. Requires CAP_SYS_NICE capability.