[PATCH 1/5] driver core: Support two-pass driver shutdown.
Christoph Hellwig
hch at lst.de
Wed Feb 14 00:10:03 PST 2024
On Tue, Feb 13, 2024 at 07:36:35PM -0800, Saravana Kannan wrote:
> > 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.
>
> This sounds more like you need a parallelized async shutdown than a
> two-pass shutdown. Similar to how async probes are done today. Why not
> do that so it'll actually be useful in a more general fashion? You can
> even add a flag like we have for probes so that drivers don't need to
> do anything special to allow this parallelism.
Well, we had that discussion before. The typically time consuming
part in a shutdown is waiting for the device to actually shut down.
An submit and then wait later scheme is more efficient for that,
even if the "simple" async shutdown that just spawns more threads
will also work, while being a lot less efficient. So unless we
have a strong reason for that the two-phase scheme seems preferable
to me.
More information about the Linux-nvme
mailing list