From: Nilay Shroff <nilay@linux.ibm.com>
To: Qiliang Yuan <odys.yuan@gmail.com>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-block@vger.kernel.org, Hannes Reinecke <hare@kernel.org>,
Ming Lei <tom.leiming@gmail.com>,
"Shin'ichiro Kawasaki" <shinichiro.kawasaki@wdc.com>,
Stuart Hayes <stuart.w.hayes@gmail.com>
Subject: Re: [PATCH v2] nvme: remove namespaces in parallel
Date: Tue, 3 Nov 2026 13:11:38 +0530 [thread overview]
Message-ID: <3ea92a26-9374-479e-a693-b59de26f647c@linux.ibm.com> (raw)
In-Reply-To: <20261103-bug-nvme-remove-ns-async-v2-1-44e43766e44a@gmail.com>
On 11/3/26 11:58 AM, Qiliang Yuan wrote:
> nvme_remove_namespaces() removes the namespaces of a controller one
> after another. Each removal waits for RCU grace periods in
> del_gendisk() for the namespace and for its multipath head, about
> 20 ms in all.
>
> Deleting a controller, such as disconnecting from a fabrics target,
> thus takes time proportional to its namespace count, over a second for
> 64 namespaces. Scanning had the same problem until commit 4e893ca81170
> ("nvme_core: scan namespaces asynchronously") made it add namespaces
> in parallel.
>
> Remove the namespaces through an async domain the same way, and wait
> for all of them before returning. Each removal still waits about
> 20 ms, but the waits now overlap: a grace period is system-wide, so
> removals that wait at the same time are released by the same grace
> periods instead of each needing its own.
>
> Disconnect time from a target on the same host, over tcp to 127.0.0.1
> and over nvme-loop, with 4 I/O queues, median of 3 runs on each of two
> boots per kernel:
>
> namespaces transport before after
> 8 tcp 170 / 171 ms 85 / 91 ms
> 32 tcp 628 / 628 ms 294 / 293 ms
> 64 tcp 1201 / 1308 ms 533 / 550 ms
> 64 loop 1988 / 1913 ms 1283 / 1200 ms
>
> Signed-off-by: Qiliang Yuan<odys.yuan@gmail.com>
Looks good to me:
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
next prev parent reply other threads:[~2026-11-03 7:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 6:28 Qiliang Yuan
2026-11-03 7:41 ` Nilay Shroff [this message]
2026-11-03 8:11 ` Christoph Hellwig
2026-11-03 13:14 ` Hannes Reinecke
2026-11-03 16:19 ` Daniel Wagner
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=3ea92a26-9374-479e-a693-b59de26f647c@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=hare@kernel.org \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=odys.yuan@gmail.com \
--cc=sagi@grimberg.me \
--cc=shinichiro.kawasaki@wdc.com \
--cc=stuart.w.hayes@gmail.com \
--cc=tom.leiming@gmail.com \
/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
all inboxes | Powered by JetHome®