]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: enable EPOLLEXCLUSIVE for accept poll
authorDylan Yudaken <dylany@fb.com>
Fri, 25 Mar 2022 09:37:55 +0000 (02:37 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Mar 2022 12:30:23 +0000 (06:30 -0600)
commit85b2ff3f1de1d518c1a65a656fddfed77eb4269b
tree401c67c36d89fd07932342b741a74d1c745dc933
parent379f99b627a055fdb8ad02a6d1ab1a27be86438a
io_uring: enable EPOLLEXCLUSIVE for accept poll

When polling sockets for accept, use EPOLLEXCLUSIVE. This is helpful
when multiple accept SQEs are submitted.

For O_NONBLOCK sockets multiple queued SQEs would previously have all
completed at once, but most with -EAGAIN as the result. Now only one
wakes up and completes.

For sockets without O_NONBLOCK there is no user facing change, but
internally the extra requests would previously be queued onto a worker
thread as they would wake up with no connection waiting, and be
punted. Now they do not wake up unnecessarily.

Co-developed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220325093755.4123343-1-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c