[PATCH 0/2] multi-threading device shutdown

2018-05-02 Thread Pavel Tatashin
le CPU resources. Pavel Tatashin (2): ixgbe: release lock for the duration of ixgbe_suspend_close() drivers core: multi-threading device shutdown drivers/base/core.c | 238 ++ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 9 +- 2 files change

[PATCH 2/2] drivers core: multi-threading device shutdown

2018-05-02 Thread Pavel Tatashin
down parents, so parent device must wait for its children to finish. With this patch, on the same machine devices_shutdown() takes 1.142s, and without mlx4 one second delay only 0.38s Signed-off-by: Pavel Tatashin --- drivers/base/core.c | 238 +++- 1 file

[PATCH 1/2] ixgbe: release lock for the duration of ixgbe_suspend_close()

2018-05-02 Thread Pavel Tatashin
is not held when ixgbe_close() is called also during shutdown but for kexec case. Signed-off-by: Pavel Tatashin --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net

Re: [PATCH 1/2] ixgbe: release lock for the duration of ixgbe_suspend_close()

2018-05-03 Thread Pavel Tatashin
Hi Alex, > I'm not a fan of dropping the mutex while we go through > ixgbe_close_suspend. I'm concerned it will result in us having a > number of races on shutdown. I would agree, but ixgbe_close_suspend() is already called without this mutex from ixgbe_close(). This path is executed also during

Re: [PATCH 2/2] drivers core: multi-threading device shutdown

2018-05-03 Thread Pavel Tatashin
On Thu, May 3, 2018 at 1:54 AM Tobin C. Harding wrote: > This code was a pleasure to read, super clean. Hi Tobin, Thank you very much for your review, I will address all of your comments in the next revision. BTW, I found a lock ordering issue in my work that that I will need to fix: In de

Re: [PATCH 1/2] ixgbe: release lock for the duration of ixgbe_suspend_close()

2018-05-03 Thread Pavel Tatashin
> Hi Pavel, you might want to pull lock optimization out of this patch series. > The parallelization by itself is valuable, and optimizations for individual > devices including locks can come later. Hi Steve, Yes, I will pull this patch out of the series. Thank you for the suggestion. Pavel

[PATCH v2 1/1] drivers core: multi-threading device shutdown

2018-05-05 Thread Pavel Tatashin
4 one second delay only 0.38s Signed-off-by: Pavel Tatashin --- drivers/base/core.c | 275 1 file changed, 225 insertions(+), 50 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index b610816eb887..110d7970deef 100644 --- a/drivers

[PATCH v2 0/1] multi-threading device shutdown

2018-05-05 Thread Pavel Tatashin
these functions for every single device but only using one thread. Since, nothing else is running on the machine by the device_shutdown() s called, there is no reason not to utilize all the available CPU resources. Pavel Tatashin (1): drivers core: multi-threading device shutdown drivers/base/core.c

[PATCH v3 1/1] drivers core: multi-threading device shutdown

2018-05-07 Thread Pavel Tatashin
4 one second delay only 0.38s Signed-off-by: Pavel Tatashin --- drivers/base/core.c | 275 1 file changed, 225 insertions(+), 50 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index b610816eb887..1f9fda42a968 100644 --- a/drivers

[PATCH v3 0/1] multi-threading device shutdown

2018-05-07 Thread Pavel Tatashin
ll the available CPU resources. Pavel Tatashin (1): drivers core: multi-threading device shutdown drivers/base/core.c | 275 1 file changed, 225 insertions(+), 50 deletions(-) -- 2.17.0

Re: [PATCH v3 0/1] multi-threading device shutdown

2018-05-14 Thread Pavel Tatashin
On 05/14/2018 11:03 AM, Greg KH wrote: > On Mon, May 07, 2018 at 11:54:01AM -0400, Pavel Tatashin wrote: >> Changelog >> v2 - v3 >> - Fixed warning from kbuild test. >> - Moved device_lock/device_unlock inside device_shutdown_tree(). >> >> v1 - v

[PATCH v4 1/1] drivers core: multi-threading device shutdown

2018-05-14 Thread Pavel Tatashin
4 one second delay only 0.38s This feature can be optionally disabled via kernel parameter: device_shutdown_serial. When booted with this parameter, device_shutdown() will shutdown devices one by one. Signed-off-by: Pavel Tatashin --- drivers/base/core.c | 292 +++

[PATCH v4 0/1] multi-threading device shutdown

2018-05-14 Thread Pavel Tatashin
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 (1): drivers core: multi-threading device shutdown drivers/base/core.c

Re: [PATCH v4 1/1] drivers core: multi-threading device shutdown

2018-05-14 Thread Pavel Tatashin
Hi Andy, Thank you for your comments. I will send an updated patch soon. My replies are below: On 05/14/2018 04:04 PM, Andy Shevchenko wrote: > Can we still preserve an order here? (Yes, even if the entire list is > not fully ordered) > In the context I see it would go before netdevice.h. Sure

Re: [PATCH v4 1/1] drivers core: multi-threading device shutdown

2018-05-15 Thread Pavel Tatashin
Hi Greg, > Can you refactor this to be at least 2 patches? One that moves code > around to comon functions to make the second patch, that adds the new > functionality, easier to review and understand? Yes, I will split the patch into a two-three patches. > And I echo the "don't use kerneldoc f

[PATCH v5 1/3] drivers core: refactor device_shutdown

2018-05-15 Thread Pavel Tatashin
ion on one device. Signed-off-by: Pavel Tatashin --- drivers/base/core.c | 50 +++-- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index b610816eb887..ed189f6d1a2f 100644 --- a/drivers/base/core.c

[PATCH v5 2/3] drivers core: prepare device_shutdown for multi-threading

2018-05-15 Thread Pavel Tatashin
multi-threaded have _task() in their name. Signed-off-by: Pavel Tatashin --- drivers/base/core.c | 178 1 file changed, 149 insertions(+), 29 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index ed189f6d1a2f..210b619931bc 100644

[PATCH v5 3/3] drivers core: multi-threading device shutdown

2018-05-15 Thread Pavel Tatashin
4 one second delay only 0.38s This feature can be optionally disabled via kernel parameter: device_shutdown_serial. When booted with this parameter, device_shutdown() will shutdown devices one by one. Signed-off-by: Pavel Tatashin --- drivers/base/core.c | 70

[PATCH v5 0/3] multi-threading device shutdown

2018-05-15 Thread Pavel Tatashin
e 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

Re: [net-next 3/6] ixgbe: release lock for the duration of ixgbe_suspend_close()

2018-05-18 Thread Pavel Tatashin
  * parallelized this function, so drop lock for the > >     Parallelizing? Else the sentence doesn't parse for me. :-) Hi Sergei, In a separate series I parallelized device_shutdown(), see: http://lkml.kernel.org/r/20180516024004.28977-1-pasha.tatas...@oracle.com But, this particular patch

Re: [net-next 3/6] ixgbe: release lock for the duration of ixgbe_suspend_close()

2018-05-18 Thread Pavel Tatashin
On 05/18/2018 01:28 PM, Sergei Shtylyov wrote: > On 05/18/2018 02:37 PM, Pavel Tatashin wrote: > >> * parallelized this function, so drop lock for the >>> >>> Parallelizing? Else the sentence doesn't parse for me. :-) > >My comment ha

Re: [PATCH v2 1/1] drivers core: multi-threading device shutdown

2018-05-23 Thread Pavel Tatashin
Hi Pavel, Thank you for looking at this patch. BTW, the version 5 is out. The latest thread is anchered here: http://lkml.kernel.org/r/20180516024004.28977-1-pasha.tatas...@oracle.com > ixgbe is network card, right? So ... it does not have any persistent > state and no moving parts, and there's n