io_uring: enable option to only trigger eventfd for async completions
authorJens Axboe <axboe@kernel.dk>
Wed, 8 Jan 2020 18:04:00 +0000 (11:04 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 21 Jan 2020 00:04:04 +0000 (17:04 -0700)
commitf2842ab5b72d7ee5f7f8385c2d4f32c133f5837b
tree02731be82d19be0a9793ab1cb2ccd957c6f021b8
parent69b3e546139a21b3046b6bf0cb79d5e8c9a3fa75
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>
fs/io_uring.c
include/uapi/linux/io_uring.h