Commit 75b28aff authored by Hristo Venev's avatar Hristo Venev Committed by Jens Axboe

io_uring: allocate the two rings together

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: default avatarHristo Venev <hristo@venev.name>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 27c4d3a3
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment