• Jens Axboe's avatar
    io_uring/net: add IORING_ACCEPT_POLL_FIRST flag · d3da8e98
    Jens Axboe authored
    Similarly to how polling first is supported for receive, it makes sense
    to provide the same for accept. An accept operation does a lot of
    expensive setup, like allocating an fd, a socket/inode, etc. If no
    connection request is already pending, this is wasted and will just be
    cleaned up and freed, only to retry via the usual poll trigger.
    
    Add IORING_ACCEPT_POLL_FIRST, which tells accept to only initiate the
    accept request if poll says we have something to accept.
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    d3da8e98
net.c 42.8 KB