From patchwork Wed Dec 23 10:01:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel J Blueman X-Patchwork-Id: 7909871 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 86B049F349 for ; Wed, 23 Dec 2015 10:18:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3A0B20450 for ; Wed, 23 Dec 2015 10:18:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD16620431 for ; Wed, 23 Dec 2015 10:18:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934024AbbLWKSn (ORCPT ); Wed, 23 Dec 2015 05:18:43 -0500 Received: from mail-am1on0118.outbound.protection.outlook.com ([157.56.112.118]:34064 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933188AbbLWKSm (ORCPT ); Wed, 23 Dec 2015 05:18:42 -0500 X-Greylist: delayed 950 seconds by postgrey-1.27 at vger.kernel.org; Wed, 23 Dec 2015 05:18:41 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=numascaleo365.onmicrosoft.com; s=selector1-numascale-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QvjFnhcBgD9n1NY7pYhsuUbynJOV2wHxzmG8p9G9H6k=; b=m0GiUvxfRr2RY/VDlrICqQ3PPw22cRiW+9nP7iXduyoBG11DYLfU9GDenNqx/+KAp19YUltMwY50uLX1bNV1LC1cPeyfGEFB6eJIeK7Kw0+LtpC1GA6ATqn7+sI/biGcsFKjDmQl9+ZUpqUiyrNb4C09JxX5Fl6xwMh2AOSBpdU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=daniel@numascale.com; Received: from exige.int.numascale.com (175.156.152.184) by AM4PR07MB1428.eurprd07.prod.outlook.com (10.165.248.19) with Microsoft SMTP Server (TLS) id 15.1.361.13; Wed, 23 Dec 2015 10:02:43 +0000 From: Daniel J Blueman To: Bjorn Helgaas , Jeff Kirsher , Jesse Brandeburg , Shannon Nelson , Carolyn Wyborny , Don Skidmore , Bruce Allan , John Ronciak , Mitch Williams CC: Daniel J Blueman , , , , , Steffen Persvold , Jiang Liu , Thomas Gleixner Subject: [PATCH 2/2] ixgbe: Use core to device locality interface Date: Wed, 23 Dec 2015 18:01:41 +0800 Message-ID: <1450864901-16712-2-git-send-email-daniel@numascale.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1450864901-16712-1-git-send-email-daniel@numascale.com> References: <1450864901-16712-1-git-send-email-daniel@numascale.com> MIME-Version: 1.0 X-Originating-IP: [175.156.152.184] X-ClientProxiedBy: DB4PR05CA0004.eurprd05.prod.outlook.com (25.160.40.14) To AM4PR07MB1428.eurprd07.prod.outlook.com (25.165.248.19) X-Microsoft-Exchange-Diagnostics: 1; AM4PR07MB1428; 2:2mD7pPDnY7Biz6xkER5RPiLCXyzcfP0/JQhzCmtkuGVFpYDmYdBSdgjRbWQ6LeUv19Q8S/p5OWjbmOIYu43BcUZJilLjsTGRwSsGsXls2Z7vxf7o2zGM0evDZWJilexV/bHHBQfpWL3StJ9Yr4sH1w==; 3:/adzYG4G7Gm/duuWOjbFn06iF69uOeyHxWML3f5Wgs4juVcyzPT8Wym03Q/JMvL2fwZJSGDpOmIYJDbhzDhC2S4iFPLiilsrnjkgb2Sd3hrxCjm+hFVbxx5rtqCrNB6W; 25:o9BoDh6FuCeah/1wH+aQLsMsiXyY7nrvi9lcboreuQITfGNslxna/C9PMSB8NHHs5EstJJGrAn1ud0zeu2gCE1tFIQqnTXsWWjry6UPgpMf902yB4vYzY0e0Lx/6g1q49q6ycfwCfGJGCXAoAsa1Pg5shYVT66YMhT075Vz6Gi3xwnn3V9GFifJ/Pq9MNxM5iyhCZlEO0fyat42P5AylFkCgP5C4PPaZWwdNC/GL6LjZz/dkcqHHnJssjKoxIhWqZOMS5XyM7iXOtz+r30/NJw==; 4:9q/67cWI7sekkuXINTbWJ61vmF3azQIPpI12h3AwIKKom8GqfOMUkIA+h0HFQYzcBy1ELJjk9F2DUWZJ5bLanFvpTsTjmoDanA/ktbjlmXMey0sNw2pti5i3o+Nh6UwtE10ulylk+kR/NBZPyVvRIyK/sx36u2tvKpuIeHMiq/AuLDbi43dR14TKlF2Qi1qqx4bD2nn28DZ68IXmaP82+ofkcXlok/J/MeakCXAmVTVQUxFSwVx4P4BLn+xfD4fkjo3wGAy9bKyyY0OH1KrcMwg9WeCROC1pnWLhMU7G4c5lTTYdBV71f8UE+ik8MyTbbE1E/FBWzobNEpnzxS7FoQ/r1tL1GjIpP7pkc/QP4Am+IlLS uojxwly6p/xOvRCW X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM4PR07MB1428; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001); SRVR:AM4PR07MB1428; BCL:0; PCL:0; RULEID:; SRVR:AM4PR07MB1428; X-Forefront-PRVS: 0799B1B2D7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(81156007)(86362001)(5003940100001)(76176999)(48376002)(19580405001)(50986999)(47776003)(66066001)(50226001)(105586002)(87976001)(42186005)(3846002)(19580395003)(1096002)(5004730100002)(2950100001)(92566002)(97736004)(5001770100001)(101416001)(77096005)(50466002)(229853001)(5001960100002)(40100003)(36756003)(5008740100001)(106356001)(122386002)(189998001)(6116002)(33646002)(586003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM4PR07MB1428; H:exige.int.numascale.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: numascale.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR07MB1428; 23:Wgi5d63hs+3SEnTh6QFtDI16aPngQfUQEpGtmY0Ap?= =?us-ascii?Q?wm+n0gV4PsC2RezHXNJU7AoI79LRstfTMlK7+vfYDLFt7clUdmd+iX200MT5?= =?us-ascii?Q?W8uB7HfwZYeASbEvCdCKTcEC+dAUNFv33VF+FHWWyOB8OXXV2Cs99HyLq/0s?= =?us-ascii?Q?+VOfnpzKU2RmeQ80fF4KT0vAmgG510FS0KlRHT3IFR+2d/s3hQYZmVYwhtRI?= =?us-ascii?Q?fc1gv3bQV9RmMeZVhK2SihybYhTz+3F5kZC84l2sXKczVACFL2fVufIZkfe0?= =?us-ascii?Q?JfUbZRCCGSUHiyStooZ2lI96f5AJRoCLCU/fMQByVT978KaUHikpZT05LRM3?= =?us-ascii?Q?OyjvKHJBxt56nmXObRLAgpR9FeGLVVVs35ns5SUbgwHPJgwr94qTpS/0D08B?= =?us-ascii?Q?7RNRncZXlMe8ucUfesAAONuencwL76s3iHtgXnOQ3FZ+mbCygfIhkAVaPqZA?= =?us-ascii?Q?kqLOsNWD6H1atnSasUqs8UhIwYGeuCOH6S30LV3EV4hOnMSD3ICMlVhiSheH?= =?us-ascii?Q?QHDYHune1PpS+Vkj6LRIWaWYKO/Cb5ccKyuDNVtnc2uRQUou30+TPmVewDdD?= =?us-ascii?Q?osiQQik/peF0xF0mzZ02UP0ccwH4NivWVQEGIrEjAD5GCTy1ABo83bfdLEbR?= =?us-ascii?Q?z6pNCzI4cpwLkxWvGBCZzfPJHRQnOp1I8mZIuvuUslQCo+azLbYWZ+rJH6TN?= =?us-ascii?Q?zqwQuG6lqieJPrmhHhXC9tuV9pRN7KO/ssTGqshndjehcio1pm23L867yFEy?= =?us-ascii?Q?oLn/GLsoHPv8f3J0+3beGXkBFBoYIHul9lvR7xBBZyMajimZYOA7ZG0XeHee?= =?us-ascii?Q?qEGk3U/yscWQWbgNpkPDyZX7KVFQtgWgU6mQ95rFNJGkEyRZqxqs8pdOZuKc?= =?us-ascii?Q?eJVLlzu20NuAhgREkfKnUQmnpZHZ6pnu2W02jPhimDxjKIi6nMFxNzVh2i6q?= =?us-ascii?Q?aqJlCpkrxM8eUi/sCwz+4liMki5WB7sb8zFmufLoxTb8hLYljbQkpSndoQlb?= =?us-ascii?Q?sPKYpLrjvFPEjWQkc8jCsDkKYlNfAgRlqmV4bcxzsB+ag=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM4PR07MB1428; 5:BKzBNvXhpQwgLwym5y6akn2AWFdFjKNNSjwtayMbuZVOXqnyPpK3l5qba/04NszySH2eR+5qj8VUdzm8SgyB2m6E8Q2ENgPgo9ONeOjiZ0so/eENy/8Pliv1r65rtoSXQ8vb0/2xDLMvKVXtWDIKCg==; 24:1/nkL4vvHumXj/LUVhq+2FaT17VqTohPTlx4xzksFxl04yNtWoo8JB1oHk5ABKKfKa459w3CVKjYmkbj0UJLKhLV6tgWIXirBD9ugRMoZpw= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: numascale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2015 10:02:43.7585 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR07MB1428 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rather than assuming cores starting from 0 are local to the ethernet device, use the introduced interface to find near cores. Not only does this improve performance due to spreading interrupts via near NUMA nodes, it prevents assigning cores on distant NUMA nodes, which aren't reachable by device interrupts due to the 8-bit APIC ID limitation. With Numascale NumaConnect2 systems with Intel ixgbe cards on non-primary PCI domains, all ixgbe NICs would previously revector interrupts to cores 0 to 63 (cores 0 to 47 would be considered near the primary PCI domain). Now, cores 48 to 95 are used, increasing performance and addressing interrupt delivery issues: do_IRQ: 79.180 No irq handler for vector (irq -1) do_IRQ: 78.42 No irq handler for vector (irq -1) do_IRQ: 71.172 No irq handler for vector (irq -1) do_IRQ: 70.236 No irq handler for vector (irq -1) do_IRQ: 69.109 No irq handler for vector (irq -1) do_IRQ: 68.189 No irq handler for vector (irq -1) do_IRQ: 72.92 No irq handler for vector (irq -1) do_IRQ: 73.235 No irq handler for vector (irq -1) do_IRQ: 66.185 No irq handler for vector (irq -1) do_IRQ: 67.62 No irq handler for vector (irq -1) do_IRQ: 197 callbacks suppressed Signed-off-by: Daniel J Blueman --- drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c index f3168bc..12c4ce1 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c @@ -817,10 +817,8 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter, if ((tcs <= 1) && !(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)) { u16 rss_i = adapter->ring_feature[RING_F_RSS].indices; if (rss_i > 1 && adapter->atr_sample_rate) { - if (cpu_online(v_idx)) { - cpu = v_idx; - node = cpu_to_node(cpu); - } + cpu = cpu_near_dev(adapter->pdev, v_idx); + node = cpu_to_node(cpu); } }