Skip to content

Commit

Permalink
ixgbe: release lock for the duration of ixgbe_suspend_close()
Browse files Browse the repository at this point in the history
Currently, during device_shutdown() ixgbe holds rtnl_lock for the duration
of lengthy ixgbe_close_suspend(). On machines with multiple ixgbe cards
this lock prevents scaling if device_shutdown() function is multi-threaded.

It is not necessary to hold this lock during ixgbe_close_suspend()
as it is not held when ixgbe_close() is called also during shutdown but for
kexec case.

Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Pavel Tatashin authored and Jeff Kirsher committed May 17, 2018
1 parent b212d81 commit 6710f97
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6698,8 +6698,15 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
rtnl_lock();
netif_device_detach(netdev);

if (netif_running(netdev))
if (netif_running(netdev)) {
/* Suspend takes a long time, device_shutdown may be
* parallelized this function, so drop lock for the
* duration of this call.
*/
rtnl_unlock();
ixgbe_close_suspend(adapter);
rtnl_lock();
}

ixgbe_clear_interrupt_scheme(adapter);
rtnl_unlock();
Expand Down

0 comments on commit 6710f97

Please sign in to comment.