lkml.org 
[lkml]   [2022]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] io_uring: avoid ring quiesce in io_uring_register for eventfd opcodes
Date
This is done by creating a new RCU data structure (io_ev_fd) as part of
io_ring_ctx that holds the eventfd_ctx, with reads to the structure protected
by rcu_read_lock and writes (register/unregister calls) protected by a mutex.

With the above approach ring quiesce can be avoided which is much more
expensive then using RCU lock. On the system tested, io_uring_reigster with
IORING_REGISTER_EVENTFD takes less than 1ms with RCU lock, compared to 15ms
before with ring quiesce.

The first patch creates the RCU protected data structure and removes ring
quiesce for IORING_REGISTER_EVENTFD and IORING_UNREGISTER_EVENTFD.

The second patch builds on top of the first patch and removes ring quiesce
for IORING_REGISTER_EVENTFD_ASYNC.

Usama Arif (2):
io_uring: avoid ring quiesce while registering/unregistering eventfd
io_uring: avoid ring quiesce for IORING_REGISTER_EVENTFD_ASYNC

fs/io_uring.c | 125 +++++++++++++++++++++++++++++++++++++-------------
1 file changed, 92 insertions(+), 33 deletions(-)

--
2.25.1

\
 
 \ /
  Last update: 2022-02-03 16:13    [W:0.059 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site