Re: [PATCH v6 3/4] driver core: shut down devices asynchronously

From: Greg Kroah-Hartman
Date: Wed May 29 2024 - 02:06:04 EST


On Tue, May 28, 2024 at 10:35:27PM -0500, stuart hayes wrote:
>
>
> On 5/28/2024 1:31 AM, Christoph Hellwig wrote:
> > On Thu, May 16, 2024 at 10:49:19AM -0500, Stuart Hayes wrote:
> > > Add /sys/kernel/async_shutdown to allow user control of this feature:
> > >
> > > safe: shut down all devices synchronously, unless driver prefers async
> > > shutdown (driver opt-in) (default)
> > > on: shut down all devices asynchronously, unless disabled by the driver
> > > (driver opt-out)
> > > off: shut down all devices synchronously
> >
> > The on option seems very odd. IMHO safe is the only really sensible
> > option, and maybe we have to support off as a bandaid due to userspace
> > behavior dependent on synchronous shutdown, but I'd rather try even
> > without that first.
> >
>
> I added the option because of comments from Greg K-H on the v4 submission
> of this patch--see
>
> https://lore.kernel.org/lkml/2023102151-rejoicing-studio-6126@gregkh/T/#m5d0459480bc0fda4563040cab2036839bcbb79a8).
>
> I thought it would be nice to have the option for testing, even if it gets
> removed later, but I'll certainly remove it now if necessary.

Opt-in is the requirement here, that's all I asked for. The "on" can
probably be removed, and by doing that, you can make this option simpler
as well.

thanks,

greg k-h