Received: by 10.192.165.148 with SMTP id m20csp1384549imm; Wed, 2 May 2018 21:01:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpkRuLdrkG+WIapRMY0cTL0mdk9ALMqNa3bphwuBuaG8y/HfZbthkR7AJCbXWVo+KludGCi X-Received: by 2002:a63:7154:: with SMTP id b20-v6mr18512902pgn.426.1525320083369; Wed, 02 May 2018 21:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525320083; cv=none; d=google.com; s=arc-20160816; b=wmSxM203xasMRVQy003GsyWtNW/5lnwQ3C4Vs3emrHBI/Xz0romM7H56Puxe5/fBZE hNaDG5f939qeP2j+lRdc0+0CCCBLwUGApFFy8FzBFw8vBSfjWY0i/U3KlkrOV+6INZqB XZxu7+3IOV93DJBt1zMnpaT2YqqUhc6LVNG4Dn9/sD61Ff5O81j6n1vOICx/0gDWJH/F NuCFCgnuirWty8+PkvV81OlZd2h3PvxlbcEnxI4a5BydBoKWrrD78uIlxRA8LmGZg3NN eIRo8k6eUUKQPcMyFahFVq6oktaLcsLY95NP9Ah438egVXBQQGpma8P7usDzCGfxKoFk SKeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=A7/dEoWk1iDkrlpuqltxj8FdRRRpYUXHRc+RH3CAjsk=; b=iMeOrV3QXuLWBMqa/IyoBm7q1ygOjDvwl32+iO9HWaZhlew/jxP6ji+ulSgcbbRY50 aFSgk+qfz1YKRae3Ic5cYliuavxnLj07bNvEl4h6CnbAOhe890gZEbZDO0yrKOMkw0EY aT3N8ta8sQi2YXJhZXPnUxUOVWvyycau6kpRmE9bgONhgMGKIdj9AfUJ5HamItnd0KAz pLUP3YDCHadwiQA5dIPU4kiU3bLVHPFPrIOjxZ9c9kuewwTbbnV/Hrfl0c9jfJPG3g3J tWdtKIXu03fzsonfMjZUcRovBw1X4AvxjTMaPOfYQNj247a66Mp9zliWGVHWy3emNTgF axWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=VUQfDchS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si13053750pfa.346.2018.05.02.21.01.08; Wed, 02 May 2018 21:01:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=VUQfDchS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751072AbeECEAU (ORCPT + 99 others); Thu, 3 May 2018 00:00:20 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:57762 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751825AbeECD7n (ORCPT ); Wed, 2 May 2018 23:59:43 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w433pGVK026852; Thu, 3 May 2018 03:59:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=A7/dEoWk1iDkrlpuqltxj8FdRRRpYUXHRc+RH3CAjsk=; b=VUQfDchSN5vnyhxYkWuwfQtCW9T9MF72h+gjbh/xAvjawELy1+b7vx2+nJnSwzjnQY2E XQ4/HEEw/p54v/r/01BOyavg+FjBL54FF1MTE5OrffX+dSVl+0+SS49+jWkYu941GEu+ zBPcrrwOvhpobDR26sYOo3gM606KtuYfHKBr12vfr2nvMhDSNtvG4c53c8huQLdBXSph 7P0JcknmJG38OYiz+7Gad+OzjDEli1qENJoO/GUwsvvWIjD9yF3iSowigZT4G2U3OhA7 Nj5vroxp+WmRetHb4Ejvc5ckx3v1qL3XknMgcbUBr0/o8CPqJ6ZB9AyixT4VRjhhwT99 Pg== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2hmhmfqq9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 03 May 2018 03:59:40 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w433xeSb019215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 May 2018 03:59:40 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w433xdp2005228; Thu, 3 May 2018 03:59:39 GMT Received: from xakep.us.oracle.com (/10.154.188.87) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 02 May 2018 20:59:39 -0700 From: Pavel Tatashin To: pasha.tatashin@oracle.com, steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, jeffrey.t.kirsher@intel.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH 1/2] ixgbe: release lock for the duration of ixgbe_suspend_close() Date: Wed, 2 May 2018 23:59:30 -0400 Message-Id: <20180503035931.22439-2-pasha.tatashin@oracle.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180503035931.22439-1-pasha.tatashin@oracle.com> References: <20180503035931.22439-1-pasha.tatashin@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8881 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=714 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805030034 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 afadba99f7b8..e7875b58854b 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -6748,8 +6748,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