Skip to main content

Module ring

Module ring 

Source
Expand description

Ring buffer for async I/O submission and completion.

Each ring consists of two pages mapped into the owning processโ€™s address space: a Submission Queue (SQ) page and a Completion Queue (CQ) page. The kernel tracks metadata (head/tail pointers, ownership) internally; only the raw SQE/CQE arrays are visible to userspace.

Structsยง

Ring
A shared submission/completion ring for a single process.
RingMeta ๐Ÿ”’
Metadata header embedded at offset 0 of each ring page. The SQE/CQE array starts at RING_META_SIZE bytes from the page base.

Enumsยง

RingError

Constantsยง

MAX_RINGS ๐Ÿ”’
RING_META_SIZE ๐Ÿ”’

Staticsยง

NEXT_RING_ID ๐Ÿ”’
RING_REGISTRY ๐Ÿ”’

Functionsยง

destroy_ring
Remove a ring from the registry and free its pages.
find_ring
Find a ring by its opaque id.
next_ring_id ๐Ÿ”’