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
{{ message }}
Repository navigation
io: registered files and fixed buffers on io_uring #125
Each io_uring operation on the compio backend resolves its file descriptor and maps its buffer again, though a connection's socket and buffers live as long as the connection.
Scope
On Linux the compio backend registers each connection's socket in the ring's file table and does reads and writes into registered (fixed) buffers, falling back only for a descriptor the table has no room for.
Done when
Socket I/O on the compio backend uses registered files and fixed buffers on Linux, with the existing I/O tests passing.
Fixed buffers save per-operation page pinning, which only a zero-copy send pays: plain send/recv accept IORING_RECVSEND_FIXED_BUF only since 57ed21fad402 (June 2026), and before that only SEND_ZC honours it (io_uring/net.c). So the fixed-buffer half targets buffers the stack owns and sends zero-copy (relay buffers, outboxes) from a per-thread registered arena, alongside #126; application Bytes are not copied into it. Registered files still apply to every socket operation: the gain is the file refcount per operation, with the ordinary fd kept for kernel TLS setsockopt, getpeername and splice.
The registered-files half is in #153. The fixed-buffer half has no consumer in this repository yet: h1 sends its outbox (application Bytes plus the head) in one call, and user-mode TLS sends ciphertext with a copying write. Its consumers are the proxy relay buffers in zenwave and skyzen. compio (0.12.5, and 0.13.0-beta.1) can't register buffers and doesn't expose the submitter, so a registered arena needs an upstream change first. Once those exist, zero_copy::send<T: OpCode> takes a fixed-buffer send as is.
Activity
lexoliu commentedon Nov 11, 2026
Fixed buffers save per-operation page pinning, which only a zero-copy send pays: plain send/recv accept
IORING_RECVSEND_FIXED_BUFonly since 57ed21fad402 (June 2026), and before that only SEND_ZC honours it (io_uring/net.c). So the fixed-buffer half targets buffers the stack owns and sends zero-copy (relay buffers, outboxes) from a per-thread registered arena, alongside #126; applicationBytesare not copied into it. Registered files still apply to every socket operation: the gain is the file refcount per operation, with the ordinary fd kept for kernel TLS setsockopt, getpeername and splice.lexoliu commentedon Nov 11, 2026
The registered-files half is in #153. The fixed-buffer half has no consumer in this repository yet: h1 sends its outbox (application
Bytesplus the head) in one call, and user-mode TLS sends ciphertext with a copying write. Its consumers are the proxy relay buffers in zenwave and skyzen. compio (0.12.5, and 0.13.0-beta.1) can't register buffers and doesn't expose the submitter, so a registered arena needs an upstream change first. Once those exist,zero_copy::send<T: OpCode>takes a fixed-buffer send as is.