mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] nvme: delete controllers with many namespaces faster
@ 2026-11-02  6:14 Qiliang Yuan
  2026-11-02  6:14 ` [PATCH 1/2] nvme: remove namespaces in parallel Qiliang Yuan
  2026-11-02  6:14 ` [PATCH 2/2] block: set QUEUE_FLAG_NO_ELV_SWITCH under the read lock in del_gendisk() Qiliang Yuan
  0 siblings, 2 replies; 7+ messages in thread
From: Qiliang Yuan @ 2026-11-02  6:14 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg
  Cc: linux-nvme, linux-kernel, linux-block, Ming Lei, Nilay Shroff,
	Shin'ichiro Kawasaki, Stuart Hayes, Qiliang Yuan

Deleting an nvme controller removes its namespaces one after another,
about 20 ms each, so disconnecting from a fabrics target with 64
namespaces takes over a second.

Patch 1 removes the namespaces in parallel, as scanning already adds
them. Patch 2 drops the write lock that del_gendisk() takes on the tag
set, which would otherwise serialize the parallel removals again.

Disconnecting from a tcp target on the same host with 64 namespaces
drops from 1201-1308 ms to 115-124 ms. Details are in each patch.

Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com>
---
Qiliang Yuan (2):
      nvme: remove namespaces in parallel
      block: set QUEUE_FLAG_NO_ELV_SWITCH under the read lock in del_gendisk()

 block/genhd.c            | 17 +++++------------
 drivers/nvme/host/core.c | 13 ++++++++++++-
 2 files changed, 17 insertions(+), 13 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261102-bug-nvme-remove-ns-async-ceaaa1eda6a7

Best regards,
-- 
Qiliang Yuan <odys.yuan@gmail.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-02  9:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02  6:14 [PATCH 0/2] nvme: delete controllers with many namespaces faster Qiliang Yuan
2026-11-02  6:14 ` [PATCH 1/2] nvme: remove namespaces in parallel Qiliang Yuan
2026-11-02  7:26   ` Hannes Reinecke
2026-11-02  8:00     ` Qiliang Yuan
2026-11-02  9:27       ` Hannes Reinecke
2026-11-02  6:14 ` [PATCH 2/2] block: set QUEUE_FLAG_NO_ELV_SWITCH under the read lock in del_gendisk() Qiliang Yuan
2026-11-02  7:22   ` Hannes Reinecke

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®