aio: add support for submission/completion rings aio-poll-ring
authorJens Axboe <axboe@kernel.dk>
Tue, 4 Dec 2018 17:08:44 +0000 (10:08 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Dec 2018 17:13:43 +0000 (10:13 -0700)
commit870c7fc42a5076d6807ab5686a76d4f117471b37
tree1395a839f5f42fa0ad066dbc97fa21d9635100e9
parent1e519b7ecb3e0c43c5631ccc575904988699fe93
aio: add support for submission/completion rings

Experimental support for submitting and completing IO through rings
shared between the application and kernel.

The submission rings are struct iocb, like we would submit through
io_submit(), and the completion rings are struct io_event, like we
would pass in (and copy back) from io_getevents().

A new system call is added for this, io_ring_enter(). This system
call submits IO that is queued in the SQ ring, and/or completes IO
and stores the results in the CQ ring.

This could be augmented with a kernel thread that does the submission
and polling, then the application would never have to enter the
kernel to do IO.

Sample application: http://brick.kernel.dk/snaps/aio-ring.c

Note that we need to (in terms of cleanup/rebase)

1) Bring in the mapped_range support sooner
2) Fold the system call changes (both of them)

Signed-off-by: Jens Axboe <axboe@kernel.dk>
arch/x86/entry/syscalls/syscall_64.tbl
fs/aio.c
include/linux/syscalls.h
include/uapi/linux/aio_abi.h