You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Severity: low — one small fixed cost per loop tick; essentially free to remove.
Problem
Every io_uring_enter resolves and refcounts the ring fd itself (fdget/fdput) before doing any work. That's once per loop tick on the hottest syscall in the process.
Suggested fix
IORING_REGISTER_RING_FDS (register opcode 20, kernel 5.18+) hands back a registered ring index; passing that index as the fd argument together with IORING_ENTER_REGISTERED_RING (1u << 4) in the enter flags skips the per-syscall lookup/refcount. liburing does this by default for rings it creates.
Details:
Register once on the reactor thread right after Ring.Create; unregister (IORING_UNREGISTER_RING_FDS, opcode 21) before close in Dispose, on the owning thread like the rest of the single-issuer teardown.
Severity: low — one small fixed cost per loop tick; essentially free to remove.
Problem
Every
io_uring_enterresolves and refcounts the ring fd itself (fdget/fdput) before doing any work. That's once per loop tick on the hottest syscall in the process.Suggested fix
IORING_REGISTER_RING_FDS(register opcode 20, kernel 5.18+) hands back a registered ring index; passing that index as the fd argument together withIORING_ENTER_REGISTERED_RING(1u << 4) in the enter flags skips the per-syscall lookup/refcount. liburing does this by default for rings it creates.Details:
Ring.Create; unregister (IORING_UNREGISTER_RING_FDS, opcode 21) beforecloseinDispose, on the owning thread like the rest of the single-issuer teardown.fget/fput-elimination theme as perf: adopt direct descriptors (registered file table) for accepted sockets #91 — this is the enter-path edition, and much smaller, but it's a one-flag change.