io_uring: avoid ring quiesce while registering async eventfd
authorUsama Arif <usama.arif@bytedance.com>
Fri, 4 Feb 2022 14:51:15 +0000 (14:51 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 7 Feb 2022 13:47:39 +0000 (06:47 -0700)
commit06d3fc633a1cf2e2dbb181ce3b8c44f344f1418b
treed3a727c287343f07ef793aa176189a18a937a85e
parent1a75fac9a0f920a13418c88e4deaa9aa005381f5
io_uring: avoid ring quiesce while registering async eventfd

This is done using the RCU data structure (io_ev_fd). eventfd_async is
moved from io_ring_ctx to io_ev_fd which is RCU protected hence avoiding
ring quiesce which is much more expensive than an RCU lock. The place
where eventfd_async is read is already under rcu_read_lock so there is no
extra RCU read-side critical section needed.

Signed-off-by: Usama Arif <usama.arif@bytedance.com>
Link: https://lore.kernel.org/r/20220204145117.1186568-4-usama.arif@bytedance.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c