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>
Thu, 10 Mar 2022 13:32:49 +0000 (06:32 -0700)
commitc75312dd592b31427caa88170b61fdc3ae5b2891
tree1c0d7db092564493b06549991bcb9a099f0f29f2
parent77bc59b498174ea4f120d477d2cd0cf90fc58235
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