diff options
| author | Jens Axboe <axboe@kernel.dk> | 2019-01-09 10:59:42 -0500 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2019-02-28 10:24:23 -0500 |
| commit | def596e9557c91d9846fc4d84d26f2c564644416 (patch) | |
| tree | 1d11084da1199e419c25018efb8b0490fc4f3d7a /include/uapi | |
| parent | c992fe2925d776be066d9f6cc13f9ea11d78b657 (diff) | |
io_uring: support for IO polling
Add support for a polled io_uring instance. When a read or write is
submitted to a polled io_uring, the application must poll for
completions on the CQ ring through io_uring_enter(2). Polled IO may not
generate IRQ completions, hence they need to be actively found by the
application itself.
To use polling, io_uring_setup() must be used with the
IORING_SETUP_IOPOLL flag being set. It is illegal to mix and match
polled and non-polled IO on an io_uring.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/linux/io_uring.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 4589d56d0b68..5c457ea396e6 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h | |||
| @@ -30,6 +30,11 @@ struct io_uring_sqe { | |||
| 30 | __u64 __pad2[3]; | 30 | __u64 __pad2[3]; |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | /* | ||
| 34 | * io_uring_setup() flags | ||
| 35 | */ | ||
| 36 | #define IORING_SETUP_IOPOLL (1U << 0) /* io_context is polled */ | ||
| 37 | |||
| 33 | #define IORING_OP_NOP 0 | 38 | #define IORING_OP_NOP 0 |
| 34 | #define IORING_OP_READV 1 | 39 | #define IORING_OP_READV 1 |
| 35 | #define IORING_OP_WRITEV 2 | 40 | #define IORING_OP_WRITEV 2 |
