All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 3/6] ixgbe: release lock for the duration of ixgbe_suspend_close()
Date: Thu, 17 May 2018 09:37:29 -0700	[thread overview]
Message-ID: <20180517163732.30910-4-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20180517163732.30910-1-jeffrey.t.kirsher@intel.com>

From: Pavel Tatashin <pasha.tatashin@oracle.com>

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>
---
 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/ethernet/intel/ixgbe/ixgbe_main.c
index a52d92e182ee..5ddfb93ed491 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -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();
-- 
2.17.0

  parent reply	other threads:[~2018-05-17 16:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 16:37 [net-next 0/6][pull request] 10GbE Intel Wired LAN Driver Updates 2018-05-17 Jeff Kirsher
2018-05-17 16:37 ` [net-next 1/6] ixgbe: cleanup sparse warnings Jeff Kirsher
2018-05-17 16:37 ` [net-next 2/6] ixgbe/ixgbevf: Free IRQ when PCI error recovery removes the device Jeff Kirsher
2018-05-17 16:37 ` Jeff Kirsher [this message]
2018-05-18  8:59   ` [net-next 3/6] ixgbe: release lock for the duration of ixgbe_suspend_close() Sergei Shtylyov
2018-05-18 11:37     ` Pavel Tatashin
2018-05-18 17:28       ` Sergei Shtylyov
2018-05-18 17:35         ` Pavel Tatashin
2018-05-17 16:37 ` [net-next 4/6] ixgbe: force VF to grab new MAC on driver reload Jeff Kirsher
2018-05-17 16:37 ` [net-next 5/6] ixgbevf: fix MAC address changes through ixgbevf_set_mac() Jeff Kirsher
2018-05-17 16:37 ` [net-next 6/6] ice: Update NVM AQ command functions Jeff Kirsher
2018-05-17 21:03 ` [net-next 0/6][pull request] 10GbE Intel Wired LAN Driver Updates 2018-05-17 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180517163732.30910-4-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.