]> Git Repo - linux.git/commit
io_uring: add memory region registration
authorPavel Begunkov <[email protected]>
Fri, 15 Nov 2024 16:54:42 +0000 (16:54 +0000)
committerJens Axboe <[email protected]>
Fri, 15 Nov 2024 16:58:34 +0000 (09:58 -0700)
commit93238e66185524aad925acefb2312203b9e26d63
tree4bddf36ccdd44583f185692135b1fb298265a512
parentdfbbfbf191878e8dd422768ce009858d8b5b761e
io_uring: add memory region registration

Regions will serve multiple purposes. First, with it we can decouple
ring/etc. object creation from registration / mapping of the memory they
will be placed in. We already have hacks that allow to put both SQ and
CQ into the same huge page, in the future we should be able to:

region = create_region(io_ring);
create_pbuf_ring(io_uring, region, offset=0);
create_pbuf_ring(io_uring, region, offset=N);

The second use case is efficiently passing parameters. The following
patch enables back on top of regions IORING_ENTER_EXT_ARG_REG, which
optimises wait arguments. It'll also be useful for request arguments
replacing iovecs, msghdr, etc. pointers. Eventually it would also be
handy for BPF as well if it comes to fruition.

Signed-off-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/0798cf3a14fad19cfc96fc9feca5f3e11481691d.1731689588.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <[email protected]>
include/linux/io_uring_types.h
include/uapi/linux/io_uring.h
io_uring/io_uring.c
io_uring/register.c
This page took 0.053657 seconds and 4 git commands to generate.