]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: allocate the two rings together
authorHristo Venev <hristo@venev.name>
Mon, 26 Aug 2019 17:23:46 +0000 (17:23 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 27 Aug 2019 16:42:02 +0000 (10:42 -0600)
commite520227a83075dc7a0b0ae6af5569ce3a602d729
tree4a0f288bf42e5b8dfbc20c4d09dcaad41e69e59f
parentd1de45daeee0641ef50d7913aa00bfff06a58ddf
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: Hristo Venev <hristo@venev.name>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c