Netdev List
 help / color / mirror / Atom feed
* [PATCH v6 0/3] multi-threading device shutdown
@ 2018-06-29 18:25 Pavel Tatashin
  2018-06-29 18:25 ` [PATCH v6 1/3] drivers core: refactor device_shutdown Pavel Tatashin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Pavel Tatashin @ 2018-06-29 18:25 UTC (permalink / raw)
  To: pasha.tatashin, steven.sistare, daniel.m.jordan, linux-kernel,
	jeffrey.t.kirsher, intel-wired-lan, netdev, gregkh,
	alexander.duyck, tobin, andy.shevchenko

Changelog
v6 - v5
	- Added Review-by from Andy.
	- Synced with mainline
v4 - v5
	- Addressed comments from Andy Shevchenko and Greg
	  Kroah-Hartman
	- Split the patch into a series of 3 patches in order to
	  provide a better bisecting, and facilitate with reviewing.
v3 - v4
	- Added device_shutdown_serial kernel parameter to disable
	  multi-threading as suggested by Greg Kroah-Hartman

v2 - v3
	- Fixed warning from kbuild test.
	- Moved device_lock/device_unlock inside device_shutdown_tree().

v1 - v2
	- It turns out we cannot lock more than MAX_LOCK_DEPTH by a single
	  thread. (By default this value is 48), and is used to detect
	  deadlocks. So, I re-wrote the code to only lock one devices per
	  thread instead of pre-locking all devices by the main thread.
	- Addressed comments from Tobin C. Harding.
	- As suggested by Alexander Duyck removed ixgbe changes. It can be
	  done as a separate work scaling RTNL mutex.

Do a faster shutdown by calling dev->*->shutdown(dev) in parallel.
device_shutdown() calls these functions for every single device but
only using one thread.

Since, nothing else is running on the machine by the time
device_shutdown() is called, there is no reason not to utilize all the
available CPU resources.

Pavel Tatashin (3):
  drivers core: refactor device_shutdown
  drivers core: prepare device_shutdown for multi-threading
  drivers core: multi-threading device shutdown

 drivers/base/core.c | 290 +++++++++++++++++++++++++++++++++++++-------
 1 file changed, 243 insertions(+), 47 deletions(-)

-- 
2.18.0

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-29 21:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-29 18:25 [PATCH v6 0/3] multi-threading device shutdown Pavel Tatashin
2018-06-29 18:25 ` [PATCH v6 1/3] drivers core: refactor device_shutdown Pavel Tatashin
2018-06-29 18:25 ` [PATCH v6 2/3] drivers core: prepare device_shutdown for multi-threading Pavel Tatashin
2018-06-29 20:38   ` Andy Shevchenko
2018-06-29 21:20     ` Pavel Tatashin
2018-06-29 18:25 ` [PATCH v6 3/3] drivers core: multi-threading device shutdown Pavel Tatashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox