]> git.dujemihanovic.xyz Git - linux.git/commit
io_uring/net: add IORING_ACCEPT_POLL_FIRST flag
authorJens Axboe <axboe@kernel.dk>
Wed, 8 May 2024 14:17:50 +0000 (08:17 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 9 May 2024 18:22:11 +0000 (12:22 -0600)
commitd3da8e98592693811c14c31f05380f378411fea1
tree885a341cad3532350cdab6c841a78c8d20425805
parent7dcc758cca432510f77b2fe1077be2314bc3785b
io_uring/net: add IORING_ACCEPT_POLL_FIRST flag

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: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/io_uring.h
io_uring/net.c