Skip to content

Commit

Permalink
io_uring: allocate the two rings together
Browse files Browse the repository at this point in the history
Both the sq and the cq rings have sizes just over a power of two, and
the sq ring is significantly smaller. By bundling them in a single
alllocation, we get the sq ring for free.

This also means that IORING_OFF_SQ_RING and IORING_OFF_CQ_RING now mean
the same thing. If we indicate this to userspace, we can save a mmap
call.

Signed-off-by: Hristo Venev <hristo@venev.name>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
hvenev authored and axboe committed Aug 27, 2019
1 parent 27c4d3a commit 75b28af
Showing 1 changed file with 128 additions and 127 deletions.

0 comments on commit 75b28af

Please sign in to comment.