Skip to main content

probe

Function probe 

Source
pub fn probe() -> Result<()>
Expand description

Can this kernel run the arm at all? — one io_uring_setup of a two-entry ring plus the opcode probe UringWriter::create makes, and nothing else: no registration, no file, no byte on disk. The ring is torn down before this returns.

For the caller that has to CHOOSE an arm before it opens its first store — gunnar’s PID 1 on an appliance whose kernel may ship # CONFIG_IO_URING is not set (ENOSYS), kernel.io_uring_disabled=2 (EPERM), or a seccomp policy without the syscall. Err carries the std::io::Error of the refusal, so the caller can fall back to SafeWriter by name — “safe (io_uring unavailable: ENOSYS)” on a row — rather than by silence. This crate itself never falls back: UringWriter::create refuses, and that refusal is what a bench must see.

Cheap: one setup + one IORING_REGISTER_PROBE + close, ~30 µs on oden. A ring is charged against nothing durable after it is closed, so probing once per process leaves no residue for the stores that follow.