aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-01-08 11:04:00 -0700
committerJens Axboe <axboe@kernel.dk>2020-01-20 17:04:04 -0700
commitf2842ab5b72d7ee5f7f8385c2d4f32c133f5837b (patch)
tree02731be82d19be0a9793ab1cb2ccd957c6f021b8 /include/uapi
parentio_uring: change io_ring_ctx bool fields into bit fields (diff)
downloadlinux-dev-f2842ab5b72d7ee5f7f8385c2d4f32c133f5837b.tar.xz
linux-dev-f2842ab5b72d7ee5f7f8385c2d4f32c133f5837b.zip
io_uring: enable option to only trigger eventfd for async completions
If an application is using eventfd notifications with poll to know when new SQEs can be issued, it's expecting the following read/writes to complete inline. And with that, it knows that there are events available, and don't want spurious wakeups on the eventfd for those requests. This adds IORING_REGISTER_EVENTFD_ASYNC, which works just like IORING_REGISTER_EVENTFD, except it only triggers notifications for events that happen from async completions (IRQ, or io-wq worker completions). Any completions inline from the submission itself will not trigger notifications. Suggested-by: Mark Papadakis <markuspapadakis@icloud.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/io_uring.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 0fe270ab191c..66772a90a7f2 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -192,6 +192,7 @@ struct io_uring_params {
#define IORING_REGISTER_EVENTFD 4
#define IORING_UNREGISTER_EVENTFD 5
#define IORING_REGISTER_FILES_UPDATE 6
+#define IORING_REGISTER_EVENTFD_ASYNC 7
struct io_uring_files_update {
__u32 offset;