From: Tanjore Suresh <tansuresh@google.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org,
linux-pci@vger.kernel.org, Tanjore Suresh <tansuresh@google.com>
Subject: [PATCH v2 0/3] Asynchronous shutdown interface and example implementation
Date: Tue, 12 Apr 2022 15:43:45 -0700 [thread overview]
Message-ID: <20220412224348.1038613-1-tansuresh@google.com> (raw)
Problem:
Some of our machines are configured with many NVMe devices and
are validated for strict shutdown time requirements. Each NVMe
device plugged into the system, typicaly takes about 4.5 secs
to shutdown. A system with 16 such NVMe devices will takes
approximately 80 secs to shutdown and go through reboot.
The current shutdown APIs as defined at bus level is defined to be
synchronous. Therefore, more devices are in the system the greater
the time it takes to shutdown. This shutdown time significantly
contributes the machine reboot time.
Solution:
This patch set proposes an asynchronous shutdown interface at bus level,
modifies the core driver, device shutdown routine to exploit the
new interface while maintaining backward compatibility with synchronous
implementation already existing (Patch 1 of 3) and exploits new interface
to enable all PCI-E based devices to use asynchronous interface semantics
if necessary (Patch 2 of 3). The implementation at PCI-E level also works
in a backward compatible way, to allow exiting device implementation
to work with current synchronous semantics. Only show cases an example
implementation for NVMe device to exploit this asynchronous shutdown
interface. (Patch 3 of 3).
Changelog:
v2: - Replaced the shutdown_pre & shutdown_post entry point names with the
recommended names (async_shutdown_start and asynch_shutdown_end).
- Comment about ordering requirements between bridge shutdown versus
leaf/endpoint shutdown was agreed to be different when calling
async_shutdown_start and async_shutdown_end. Now this implements the
same order of calling both start and end entry points.
Tanjore Suresh (3):
driver core: Support asynchronous driver shutdown
PCI: Support asynchronous shutdown
nvme: Add async shutdown support
drivers/base/core.c | 38 +++++++++++++++++-
drivers/nvme/host/core.c | 28 +++++++++----
drivers/nvme/host/nvme.h | 8 ++++
drivers/nvme/host/pci.c | 80 ++++++++++++++++++++++++--------------
drivers/pci/pci-driver.c | 20 ++++++++--
include/linux/device/bus.h | 12 ++++++
include/linux/pci.h | 4 ++
7 files changed, 149 insertions(+), 41 deletions(-)
--
2.36.0.rc0.470.gd361397f0d-goog
next reply other threads:[~2022-04-12 23:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 22:43 Tanjore Suresh [this message]
2022-04-12 22:43 ` [PATCH v2 1/3] driver core: Support asynchronous driver shutdown Tanjore Suresh
2022-04-12 22:43 ` [PATCH v2 2/3] PCI: Support asynchronous shutdown Tanjore Suresh
2022-04-12 22:43 ` [PATCH v2 3/3] nvme: Add async shutdown support Tanjore Suresh
2022-04-15 14:42 ` [PATCH v2 1/3] driver core: Support asynchronous driver shutdown Rafael J. Wysocki
2022-04-29 18:03 ` Tanjore Suresh
2022-04-30 7:52 ` Greg Kroah-Hartman
2022-05-02 19:13 ` Tanjore Suresh
2022-05-11 21:02 ` Tanjore Suresh
2022-05-17 10:13 ` Greg Kroah-Hartman
[not found] ` <CALVARr6GNk=LCLaeaW87=UKPz+LtJFnuXbARkH44R+vs3E3S-Q@mail.gmail.com>
2022-04-20 6:13 ` [PATCH v2 0/3] Asynchronous shutdown interface and example implementation Greg Kroah-Hartman
2022-04-20 6:14 ` Greg Kroah-Hartman
2022-04-20 17:05 ` Greg Kroah-Hartman
[not found] ` <CALVARr7Ms7+jL3EyTNNRaOB6co0ycWQtCWCDU+0zVjOnKEuK7g@mail.gmail.com>
2022-04-21 6:24 ` Greg Kroah-Hartman
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=20220412224348.1038613-1-tansuresh@google.com \
--to=tansuresh@google.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sagi@grimberg.me \
/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;
as well as URLs for NNTP newsgroup(s).