lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZmoM59t82BCy8h3b@jeremy-HP-Z840-Workstation>
Date: Wed, 12 Jun 2024 14:02:31 -0700
From: Jeremy Allison <jra@...ba.org>
To: Keith Busch <kbusch@...nel.org>
Cc: Stuart Hayes <stuart.w.hayes@...il.com>, linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J . Wysocki" <rafael@...nel.org>,
	Tanjore Suresh <tansuresh@...gle.com>,
	Martin Belanger <Martin.Belanger@...l.com>,
	Oliver O'Halloran <oohall@...il.com>,
	Daniel Wagner <dwagner@...e.de>, Lukas Wunner <lukas@...ner.de>,
	David Jeffery <djeffery@...hat.com>,
	Jeremy Allison <jallison@....com>, Jens Axboe <axboe@...com>,
	Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>,
	linux-nvme@...ts.infradead.org
Subject: Re: [PATCH v6 3/4] driver core: shut down devices asynchronously

On Wed, Jun 12, 2024 at 02:55:11PM -0600, Keith Busch wrote:
>On Thu, May 16, 2024 at 10:49:19AM -0500, Stuart Hayes wrote:
>> Add code to shut down devices asynchronously, while ensuring that each
>> device is shut down before its parents & suppliers, and allowing devices
>> that share a driver to be shutdown one at a time if necessary.
>>
>> 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
>>
>> Add async_shutdown to struct device_driver, and expose it via sysfs.
>> This will be used to view or change driver opt-in/opt-out of asynchronous
>> shutdown, if it is globally enabled.
>>
>>  async:   driver opt-in to async device shutdown (devices will be shut down
>>           asynchronously if async_shutdown is "on" or "safe")
>>  sync:    driver opt-out of async device shutdown (devices will always be
>>           shut down synchronously)
>>  default: devices will be shutdown asynchronously if async_shutdown is "on"
>>
>> This can dramatically reduce system shutdown/reboot time on systems that
>> have multiple devices that take many seconds to shut down (like certain
>> NVMe drives). On one system tested, the shutdown time went from 11 minutes
>> without this patch to 55 seconds with the patch.
>
>I've successfully tested this out on a few systems, and noticing a very
>decent shutdown time on my nvme systems. I also like the current
>solution here, as the two-pass method was harder to follow.
>
>So I think just remove the extra options that Christoph mentioned and
>always use the driver's preferred shutdown method, then this would all
>look good to me.

Yes, I have tested this patch on my systems and am greatly in
favour of this instead of the two-pass version I was trying
to make work. It is easy to understand and fixes the problem
for my NVME issue.

Jeremy.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ