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>
This commit is contained in:
parent
69b3e54613
commit
f2842ab5b7
2 changed files with 17 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue