• Jens Axboe's avatar
    io_uring: enable option to only trigger eventfd for async completions · f2842ab5
    Jens Axboe authored
    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: default avatarMark Papadakis <markuspapadakis@icloud.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    f2842ab5
io_uring.c 154 KB