public inbox for [email protected]
 help / color / mirror / Atom feed
From: Usama Arif <[email protected]>
To: [email protected], [email protected],
	[email protected], [email protected]
Cc: [email protected], Usama Arif <[email protected]>
Subject: [PATCH 0/2] io_uring: avoid ring quiesce in io_uring_register for eventfd opcodes
Date: Thu,  3 Feb 2022 15:11:51 +0000	[thread overview]
Message-ID: <[email protected]> (raw)

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


             reply	other threads:[~2022-02-03 15:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 15:11 Usama Arif [this message]
2022-02-03 15:11 ` [PATCH 1/2] io_uring: avoid ring quiesce while registering/unregistering eventfd Usama Arif
2022-02-03 15:48   ` Pavel Begunkov
2022-02-03 17:47     ` Usama Arif
2022-02-03 15:55   ` Jens Axboe
2022-02-03 16:49     ` Usama Arif
2022-02-03 16:58       ` Jens Axboe
2022-02-03 17:42         ` [External] " Usama Arif
2022-02-03 15:11 ` [PATCH 2/2] io_uring: avoid ring quiesce for IORING_REGISTER_EVENTFD_ASYNC Usama Arif

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox