]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf718606ad0f7a26ef56fa6fa8dffc803b2524d0b
tree1c0d7db092564493b06549991bcb9a099f0f29f2
parenta4c1fb044240f6f5ff77ca4618cb0c87d414da3f
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