]> 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)
commitb1e0878ada1cb35204e318537babcbf1018732f1
tree02731be82d19be0a9793ab1cb2ccd957c6f021b8
parent9e28b5b510463d2aaa7490df9345e58783d3c83c
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