public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] improve nvme quiesce time for large amount of namespaces
@ 2022-10-13  9:44 Chao Leng
  2022-10-13  9:44 ` [PATCH v2 1/2] blk-mq: add tagset quiesce interface Chao Leng
                   ` (2 more replies)
  0 siblings, 3 replies; 40+ messages in thread
From: Chao Leng @ 2022-10-13  9:44 UTC (permalink / raw)
  To: linux-nvme, linux-block; +Cc: hch, sagi, kbusch, lengchao, ming.lei, axboe

This set improves the quiesce time when using a large set of
namespaces, which also improves I/O failover time in a multipath environment.

We improve for both non-blocking hctxs and blocking hctxs introducing
blk_mq_[un]quiesce_tagset which works on all request queues over a given
tagset in parallel (which is the case in nvme) for both tagset types (blocking
and non-blocking);

Changes from v1:
- improvement is based on tagset rather than namesapces

Chao Leng (2):
  blk-mq: add tagset quiesce interface
  nvme: use blk_mq_[un]quiesce_tagset

 block/blk-mq.c           | 75 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/nvme/host/core.c | 42 +++++++++------------------
 drivers/nvme/host/nvme.h |  2 +-
 include/linux/blk-mq.h   |  2 ++
 include/linux/blkdev.h   |  2 ++
 5 files changed, 93 insertions(+), 30 deletions(-)

-- 
2.16.4



^ permalink raw reply	[flat|nested] 40+ messages in thread
* [PATCH v2 0/2] improve nvme quiesce time for large amount of namespaces
@ 2022-10-20  3:53 Chao Leng
  2022-10-20  6:34 ` Christoph Hellwig
  0 siblings, 1 reply; 40+ messages in thread
From: Chao Leng @ 2022-10-20  3:53 UTC (permalink / raw)
  To: linux-nvme, linux-block
  Cc: hch, sagi, kbusch, lengchao, axboe, ming.lei, paulmck

Now nvme_stop_queues quiesce all queues one by one. Every queue must
wait a grace period(rcu or srcu). If the controller has a large amount
of namespaces, the total waiting time is very long.
Test result: the total waiting time is more than 20 seconds when the
controller has 256 namespace.

This set improves the quiesce time when using a large set of namespaces,
which also improves I/O failover time in a multipath environment.

We improve for both non-blocking tagset and blocking tagset introducing
blk_mq_[un]quiesce_tagset which works on all request queues over a given
tagset in parallel (which is the case in nvme).

Changes from v2:
- replace call_srcu to start_poll_synchronize_srcu
- rename the flag name to make it accurate.
- move unquiescing queue outside from nvme_set_queue_dying
- add mutex to ensure that all queues are quiesced after set the NVME_CTRL_STOPPED.

Changes from v1:
- improvement is based on tagset rather than namesapces

Chao Leng (2):
  blk-mq: add tagset quiesce interface
  nvme: use blk_mq_[un]quiesce_tagset

 block/blk-mq.c           | 76 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/nvme/host/core.c | 57 +++++++++++++++---------------------
 drivers/nvme/host/nvme.h |  3 +-
 include/linux/blk-mq.h   |  2 ++
 include/linux/blkdev.h   |  3 ++
 5 files changed, 106 insertions(+), 35 deletions(-)

-- 
2.16.4



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

end of thread, other threads:[~2022-10-20  9:42 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-13  9:44 [PATCH v2 0/2] improve nvme quiesce time for large amount of namespaces Chao Leng
2022-10-13  9:44 ` [PATCH v2 1/2] blk-mq: add tagset quiesce interface Chao Leng
2022-10-13 10:28   ` Sagi Grimberg
2022-10-14  2:09     ` Chao Leng
2022-10-17 13:43     ` Christoph Hellwig
2022-10-18  9:51       ` Chao Leng
2022-10-17 13:39   ` Christoph Hellwig
2022-10-17 13:42     ` Christoph Hellwig
2022-10-18  8:39       ` Sagi Grimberg
2022-10-18  8:55         ` Christoph Hellwig
2022-10-18  9:06           ` Sagi Grimberg
2022-10-18 11:05             ` Christoph Hellwig
2022-10-18  9:52       ` Chao Leng
2022-10-17 15:21     ` Paul E. McKenney
2022-10-17 15:31       ` Christoph Hellwig
2022-10-17 22:41         ` Paul E. McKenney
2022-10-18  5:19           ` Christoph Hellwig
2022-10-19  0:35             ` Ming Lei
2022-10-19  7:15               ` Sagi Grimberg
2022-10-19  7:25                 ` Christoph Hellwig
2022-10-19  7:27                   ` Christoph Hellwig
2022-10-19  7:30                   ` Sagi Grimberg
2022-10-19  7:32                     ` Christoph Hellwig
2022-10-19  7:57                       ` Sagi Grimberg
2022-10-19  8:17                         ` Christoph Hellwig
2022-10-19  8:29                           ` Sagi Grimberg
2022-10-18  9:52       ` Chao Leng
2022-10-18 15:04         ` Paul E. McKenney
2022-10-19  2:39           ` Chao Leng
2022-10-18  9:52     ` Chao Leng
2022-10-13  9:44 ` [PATCH v2 2/2] nvme: use blk_mq_[un]quiesce_tagset Chao Leng
2022-10-13 10:22   ` Sagi Grimberg
2022-10-14  2:09     ` Chao Leng
2022-10-17 13:48     ` Christoph Hellwig
2022-10-13 14:32 ` [PATCH v2 0/2] improve nvme quiesce time for large amount of namespaces Chaitanya Kulkarni
2022-10-14  2:12   ` Chao Leng
2022-10-15  0:30     ` Chaitanya Kulkarni
  -- strict thread matches above, loose matches on Subject: below --
2022-10-20  3:53 Chao Leng
2022-10-20  6:34 ` Christoph Hellwig
2022-10-20  9:36   ` Chao Leng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox