§ I/O Queues
Every queue answers the same requests, and each spends what its kernel offers:
- io_uring. Both io_uring variants use registered files, direct descriptors, an incremental provided receive-buffer ring, a sparse table of registered buffers,
SEND_ZCzero-copy sends of file windows and segments of a page or more,SENDMSGgathered sends of shorter ones, andREAD_FIXEDfile reads. The 6.18 variant adds multishot receive and vectoredREADV_FIXEDfile reads. - Readiness and completion ports.
linux-epollaioreads files through Linux AIO completing into its epoll set, sends the same withMSG_ZEROCOPY, and refuses to start whereio_setupis refused, namingfs.aio-max-nr.posixreads files blocking; FreeBSDkqueuereads them throughaio_readlanding asEVFILT_AIOevents, and macOSkqueuethroughaio_read, a vectored read aslio_listiobatches, polled withaio_errorwhile its wait shrinks from 1 µs to 1 ms; IOCP reads through overlapped unbuffered reads. These send by copying, and a kernel refusing to queue a read has it read blocking. The readiness queues gather asend_vectors_kthroughsendmsg, while IOCP and Registered I/O, whose loops send one span at a time, refuse one. - Credit-limited accepts. Accepts remain one-shot operations: multishot direct accept can consume more connections than a finite file table can install before userspace observes a completion.