From: Jens Axboe <axboe@kernel.dk>
To: Dylan Yudaken <dylany@fb.com>, io-uring@vger.kernel.org
Cc: asml.silence@gmail.com
Subject: Re: [PATCH] io_uring: fix bug in slow unregistering of nodes
Date: Fri, 21 Jan 2022 13:23:20 -0700 [thread overview]
Message-ID: <628fcdf3-f03d-fdef-7bb9-9b033fc1234a@kernel.dk> (raw)
In-Reply-To: <20220121123856.3557884-1-dylany@fb.com>
On 1/21/22 5:38 AM, Dylan Yudaken wrote:
> In some cases io_rsrc_ref_quiesce will call io_rsrc_node_switch_start,
> and then immediately flush the delayed work queue &ctx->rsrc_put_work.
>
> However the percpu_ref_put does not immediately destroy the node, it
> will be called asynchronously via RCU. That ends up with
> io_rsrc_node_ref_zero only being called after rsrc_put_work has been
> flushed, and so the process ends up sleeping for 1 second unnecessarily.
>
> This patch executes the put code immediately if we are busy
> quiescing.
Looks good to me, and as far as I can tell, this bug was introduced by:
commit 4a38aed2a0a729ccecd84dca5b76d827b9e1294d
Author: Jens Axboe <axboe@kernel.dk>
Date: Thu May 14 17:21:15 2020 -0600
io_uring: batch reap of dead file registrations
so I'll add a fixes line to that effect to the commit. Thanks!
--
Jens Axboe
next prev parent reply other threads:[~2022-01-21 20:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 12:38 [PATCH] io_uring: fix bug in slow unregistering of nodes Dylan Yudaken
2022-01-21 20:23 ` Jens Axboe [this message]
2022-01-23 16:36 ` Jens Axboe
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 \
--in-reply-to=628fcdf3-f03d-fdef-7bb9-9b033fc1234a@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=dylany@fb.com \
--cc=io-uring@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.