From: Bjorn Helgaas <helgaas@kernel.org>
To: Jeremy Allison <jallison@ciq.com>
Cc: jra@samba.org, tansuresh@google.com, hch@lst.de,
gregkh@linuxfoundation.org, rafael@kernel.org,
bhelgaas@google.com, linux-nvme@lists.infradead.org
Subject: Re: [PATCH 1/4] driver core: Support two-pass driver shutdown
Date: Wed, 27 Dec 2023 14:33:37 -0600 [thread overview]
Message-ID: <20231227203337.GA1509884@bhelgaas> (raw)
In-Reply-To: <20231221172257.2234320-2-jallison@ciq.com>
On Thu, Dec 21, 2023 at 09:22:54AM -0800, Jeremy Allison wrote:
> From: Tanjore Suresh <tansuresh@google.com>
>
> This changes the bus driver interface with an additional entry point
> to enable devices to implement two-pass shutdown. The existing
> synchronous interface to shutdown is called, and if a shutdown_wait
> method is defined the device is moved to an alternate list.
>
> Once the shutdown method is called for all devices, the
> shutdown_wait method is then called synchronously for
> all devices on the alternate list.
Christoph and Sagi noted that the objective is similar to "fire now
and wait for completion later."
Would it be practical to actually *do* that, e.g., add a global
shutdown workqueue, have the .shutdown() method of nvme and similar
drivers add items to it, and have the driver core wait until
everything on that workqueue has completed?
But I'm not a workqueue expert and I do see the scary warning at
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/workqueue.h?id=v6.6#n619,
about not flushing system-wide workqueues, so maybe this wouldn't be
workable.
Bjorn
next prev parent reply other threads:[~2023-12-27 20:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 17:22 Make NVME shutdown two-pass - Version 3 Jeremy Allison
2023-12-21 17:22 ` [PATCH 1/4] driver core: Support two-pass driver shutdown Jeremy Allison
2023-12-21 17:29 ` Greg KH
2023-12-27 20:33 ` Bjorn Helgaas [this message]
2024-01-01 9:23 ` Sagi Grimberg
2024-01-02 23:12 ` Jeremy Allison
2024-01-05 4:28 ` Christoph Hellwig
2024-01-02 18:07 ` Jeremy Allison
2024-01-05 4:29 ` Christoph Hellwig
2024-01-05 18:15 ` Bjorn Helgaas
2024-01-08 8:28 ` Christoph Hellwig
2023-12-21 17:22 ` [PATCH 2/4] PCI: Support two-pass shutdown Jeremy Allison
2023-12-21 17:22 ` [PATCH 3/4] Change 'bool shutdown' into an enum shutdown_type { NVME_DISABLE_RESET = 0, NVME_DISABLE_SHUTDOWN_SYNC = 1 } Jeremy Allison
2023-12-27 19:33 ` Bjorn Helgaas
2024-01-02 18:06 ` Jeremy Allison
2023-12-21 17:22 ` [PATCH 4/4] nvme: Add two-pass shutdown support Jeremy Allison
2023-12-25 9:58 ` Sagi Grimberg
2023-12-27 0:53 ` Jeremy Allison
2024-01-01 9:21 ` Sagi Grimberg
2024-01-02 18:03 ` Jeremy Allison
2024-01-03 8:36 ` Sagi Grimberg
2024-01-03 17:41 ` Jeremy Allison
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=20231227203337.GA1509884@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=jallison@ciq.com \
--cc=jra@samba.org \
--cc=linux-nvme@lists.infradead.org \
--cc=rafael@kernel.org \
--cc=tansuresh@google.com \
/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