public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* Make NVME shutdown two-pass - Version 6
@ 2024-02-07 21:40 Jeremy Allison
  2024-02-07 21:40 ` [PATCH 1/5] driver core: Support two-pass driver shutdown Jeremy Allison
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Jeremy Allison @ 2024-02-07 21:40 UTC (permalink / raw)
  To: jallison, jra, tansuresh, hch, gregkh, rafael, bhelgaas, sagi,
	djeffery
  Cc: linux-nvme

This is version 6 of a patchset originally written by
Tanjore Suresh <tansuresh@google.com> to make shutdown
of nvme devices two-pass.

Changes from Version 5:

1). Function nvme_request_shutdown() name changed to
nvme_ctrl_shutdown_start() as requested by Sagi Grimberg.
2). Git commit message reformatting to 75 columns
as requested by Bjorn Helgaas <bhelgaas@google.com>.

NB. An alternate patchset from David Jeffery <djeffery@redhat.com>
has been proposed that covers much of the same ground.

I'm happy to collaborate on merging these two patchsets
if that is requested by the Linux nvme community.

-------------------------------------------------------------
Currently the Linux nvme driver shutdown code steps
through each connected drive, sets the NVME_CC_SHN_NORMAL
(normal shutdown) flag and then polls the given drive
waiting for the response NVME_CSTS_SHST_CMPLT flag
(shutdown complete).

Each drive is taking around 13 seconds to respond to this.

The customer has 20+ drives on the box so this time adds
up on shutdown when the nvme driver is being shut down.

This patchset changes shutdown to proceed in parallel,
so the NVME_CC_SHN_NORMAL (normal shutdown) flag is
sent to all drives first, and then it polls waiting
for the NVME_CSTS_SHST_CMPLT flag (shutdown complete)
for all drives.

In the specific customer case it reduces the NVME
shutdown time from over 300 seconds to around 15
seconds.
-------------------------------------------------------------

Jeremy Allison
CIQ / Samba Team.




^ permalink raw reply	[flat|nested] 21+ messages in thread
* Make NVME shutdown two-pass - Version 5
@ 2024-01-29 18:19 Jeremy Allison
  2024-01-29 18:19 ` [PATCH 5/5] nvme: Add two-pass shutdown support Jeremy Allison
  0 siblings, 1 reply; 21+ messages in thread
From: Jeremy Allison @ 2024-01-29 18:19 UTC (permalink / raw)
  To: jallison, jra, tansuresh, hch, gregkh, rafael, bhelgaas, sagi; +Cc: linux-nvme

This is version 5 of a patchset originally written by
Tanjore Suresh <tansuresh@google.com> to make shutdown
of nvme devices two-pass.

Changes from version 4:

1). Isolated 'enum shutdown_type' change into
drivers/nvme/host/pci.c only.

2). Added a new function: nvme_request_shutdown()
that requests shutdown but doesn't wait for completion,
called from within nvme_dev_disable() when shutdown_type
is NVME_PCI_DISABLE_SHUTDOWN_TWOPASS.

I didn't get feedback on my 'bool or enum' request,
so decided to go with the enum as it reduced the amount
of code changes and makes things cleaner (IMHO).

-------------------------------------------------------------
Currently the Linux nvme driver shutdown code steps
through each connected drive, sets the NVME_CC_SHN_NORMAL
(normal shutdown) flag and then polls the given drive
waiting for the response NVME_CSTS_SHST_CMPLT flag
(shutdown complete).

Each drive is taking around 13 seconds to respond to this.

The customer has 20+ drives on the box so this time adds
up on shutdown when the nvme driver is being shut down.

This patchset changes shutdown to proceed in parallel,
so the NVME_CC_SHN_NORMAL (normal shutdown) flag is
sent to all drives first, and then it polls waiting
for the NVME_CSTS_SHST_CMPLT flag (shutdown complete)
for all drives.

In the specific customer case it reduces the NVME
shutdown time from over 300 seconds to around 15
seconds.
-------------------------------------------------------------

Thanks for your consideration,

Jeremy Allison.
CIQ / Samba Team.




^ permalink raw reply	[flat|nested] 21+ messages in thread
* Make NVME shutdown two-pass - Version 4
@ 2024-01-03 21:04 Jeremy Allison
  2024-01-03 21:04 ` [PATCH 5/5] nvme: Add two-pass shutdown support Jeremy Allison
  0 siblings, 1 reply; 21+ messages in thread
From: Jeremy Allison @ 2024-01-03 21:04 UTC (permalink / raw)
  To: jallison, jra, tansuresh, hch, gregkh, rafael, bhelgaas, sagi; +Cc: linux-nvme

This is version 4 of a patchset originally written by
Tanjore Suresh <tansuresh@google.com> to make shutdown
of nvme devices two-pass.

Changes from version 3:

1). Removed duplicate setting of ctrl->ctrl_config in
nvme completion function. Noticed by Sagi Grimberg <sagi@grimberg.me>

2). Removed intermediate function nvme_wait_for_shutdown_cmpl(),
folded this code directly into nvme_shutdown_wait() by
exporting nvme_wait_ready() from drivers/nvme/host/core.c.
Requested by Sagi Grimberg <sagi@grimberg.me>

-------------------------------------------------------------
Currently the Linux nvme driver shutdown code steps
through each connected drive, sets the NVME_CC_SHN_NORMAL
(normal shutdown) flag and then polls the given drive
waiting for the response NVME_CSTS_SHST_CMPLT flag
(shutdown complete).

Each drive is taking around 13 seconds to respond to this.

The customer has 20+ drives on the box so this time adds
up on shutdown when the nvme driver is being shut down.

This patchset changes shutdown to proceed in parallel,
so the NVME_CC_SHN_NORMAL (normal shutdown) flag is
sent to all drives first, and then it polls waiting
for the NVME_CSTS_SHST_CMPLT flag (shutdown complete)
for all drives.

In the specific customer case it reduces the NVME
shutdown time from over 300 seconds to around 15
seconds.
-------------------------------------------------------------

Thanks for your consideration,

Jeremy Allison.
CIQ / Samba Team.




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

end of thread, other threads:[~2024-02-12  7:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07 21:40 Make NVME shutdown two-pass - Version 6 Jeremy Allison
2024-02-07 21:40 ` [PATCH 1/5] driver core: Support two-pass driver shutdown Jeremy Allison
2024-02-07 21:40 ` [PATCH 2/5] PCI: Support two-pass shutdown Jeremy Allison
2024-02-07 21:59   ` Bjorn Helgaas
2024-02-07 22:02     ` Jeremy Allison
2024-02-07 21:40 ` [PATCH 3/5] nvme: Change 'bool shutdown' to an enum shutdown_type in nvme_dev_disable() Jeremy Allison
2024-02-12  7:01   ` Christoph Hellwig
2024-02-07 21:40 ` [PATCH 4/5] nvme: Add a new exported function nvme_ctrl_shutdown_start() Jeremy Allison
2024-02-12  7:07   ` Christoph Hellwig
2024-02-07 21:40 ` [PATCH 5/5] nvme: Add two-pass shutdown support Jeremy Allison
2024-02-12  7:08   ` Christoph Hellwig
2024-02-07 22:00 ` Make NVME shutdown two-pass - Version 6 Bjorn Helgaas
2024-02-07 22:03   ` Jeremy Allison
2024-02-08 18:02     ` David Jeffery
2024-02-08 18:28       ` Jeremy Allison
  -- strict thread matches above, loose matches on Subject: below --
2024-01-29 18:19 Make NVME shutdown two-pass - Version 5 Jeremy Allison
2024-01-29 18:19 ` [PATCH 5/5] nvme: Add two-pass shutdown support Jeremy Allison
2024-01-30 11:15   ` Sagi Grimberg
2024-01-30 18:54     ` Jeremy Allison
2024-01-03 21:04 Make NVME shutdown two-pass - Version 4 Jeremy Allison
2024-01-03 21:04 ` [PATCH 5/5] nvme: Add two-pass shutdown support Jeremy Allison
2024-01-04 13:14   ` Sagi Grimberg
2024-01-04 17:30     ` Jeremy Allison

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