]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb63d9097440802d272b48b3870c55ee3a284f368
tree02731be82d19be0a9793ab1cb2ccd957c6f021b8
parentf346672fdb3d7033b128057ca17ab7e8d60d8de0
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