Repository navigation
Conversation
Author
|
Upstream branch: de52810 |
Author
|
Upstream branch: de52810 |
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 4e893ca ("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> Reviewed-by: Nilay Shroff <nilay@linux.ibm.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@kernel.org> Reviewed-by: Daniel Wagner <dwagner@suse.de>
ghost
force-pushed
the
series/1199829=>for-next
branch
from
November 10, 2026 10:26
5f8bbbe to
0560afe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: nvme: remove namespaces in parallel
version: 2
url: https://patchwork.kernel.org/series/1199829/