From patchwork Fri Jun 22 13:55:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghava Aditya Renukunta X-Patchwork-Id: 10483021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 15CC760383 for ; Fri, 22 Jun 2018 20:54:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04B3428E57 for ; Fri, 22 Jun 2018 20:54:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB80128F7E; Fri, 22 Jun 2018 20:54:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3316328E57 for ; Fri, 22 Jun 2018 20:54:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932748AbeFVUyV (ORCPT ); Fri, 22 Jun 2018 16:54:21 -0400 Received: from mail-by2nam03on0068.outbound.protection.outlook.com ([104.47.42.68]:13666 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754184AbeFVUyU (ORCPT ); Fri, 22 Jun 2018 16:54:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mscc365.onmicrosoft.com; s=selector1-microsemi-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=clq/gHmo4BpPuAQHfoNCN9xRngcWrTlKHygWPKwdYEM=; b=BJKOfCh5vdob7N08FaGXJjGYFNpPJAw61lWPvK3gocQR05CPp+6YNZ6yusuDqSkq0JBtgBH0rM5ByGrfiUajn4DsK3/TbtlDhjxQk+LtBo+NS4frWjrQpMhcesQIZogc3dTGAWKJLGV7bPtVbDSMxnqsLDGmraBM3T7ppyi7E50= Received: from MWHPR02CA0034.namprd02.prod.outlook.com (2603:10b6:301:60::23) by MWHPR02MB2608.namprd02.prod.outlook.com (2603:10b6:300:43::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Fri, 22 Jun 2018 20:54:18 +0000 Received: from BN1BFFO11FD022.protection.gbl (2a01:111:f400:7c10::1:160) by MWHPR02CA0034.outlook.office365.com (2603:10b6:301:60::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.884.19 via Frontend Transport; Fri, 22 Jun 2018 20:54:18 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.23) smtp.mailfrom=microsemi.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=bestguesspass action=none header.from=microsemi.com; Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.100.23 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.100.23; helo=AVMBX3.microsemi.net; Received: from AVMBX3.microsemi.net (208.19.100.23) by BN1BFFO11FD022.mail.protection.outlook.com (10.58.144.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.820.5 via Frontend Transport; Fri, 22 Jun 2018 20:54:18 +0000 Received: from AVMBX3.microsemi.net (10.100.34.33) by AVMBX3.microsemi.net (10.100.34.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 22 Jun 2018 13:54:16 -0700 Received: from microsemi-rhel.microsemi.net (10.181.116.161) by avmbx3.microsemi.net (10.100.34.33) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 22 Jun 2018 13:54:16 -0700 Subject: [PATCH] scsi: aacraid: Fix PD performance regression over incorrect qd being set From: Raghava Aditya Renukunta To: , , CC: , Date: Fri, 22 Jun 2018 06:55:47 -0700 Message-ID: <20180622135547.6682.71519.stgit@microsemi-rhel.microsemi.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:208.19.100.23; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(376002)(39860400002)(346002)(39380400002)(2980300002)(438002)(189003)(199004)(103116003)(9686003)(186003)(77096007)(476003)(50466002)(58126008)(6666003)(54906003)(110136005)(126002)(106002)(486006)(1076002)(97746001)(72206003)(86362001)(316002)(97736004)(8936002)(81156014)(81166006)(4326008)(356003)(8676002)(230700001)(478600001)(53936002)(26005)(2201001)(305945005)(7696005)(23676004)(336012)(53416004)(55016002)(47776003)(1857600001)(106466001)(5660300001)(68736007)(2486003)(59450400001)(2906002)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR02MB2608; H:AVMBX3.microsemi.net; FPR:; SPF:Pass; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD022; 1:cBLOT3/yGsZPcFmtEs/WHWX9fD5t5x7dVbRjSmm7KyNJEYQ61s9Z0JkVB0U1EihzHMKsBR5rfV07C5D1kt3dI+VzvgUITC6GoB2Vg4mHWmRBE0zFWBbVkpWTBXy1TtO5 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 973d87a0-b2bb-4770-456e-08d5d8825279 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(4608076)(2017052603328)(7153060); SRVR:MWHPR02MB2608; X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB2608; 3:LpbFiR0M7KGDyU7ohwBmUnGuXSMxKh8VqniOPXYwvIlIvircjrtFCcmNAMrEpyiKhf3rx6ChrQf3tRMfzXHL+5l1Bd0+brbbQVUPhLZ+jVjlmSp2gx0rtj0qHJBcpSUNfRGj8g9l8WUQx5zUq/5Pa6CBHNnlQBamwhhP61EuE8GOSWyvVGIneve/uCCU78gRQw9pgsiJWD0Zr0crONPZ0kS9bOi4bIpjWhwvrdyVISQ2VMbDqmdec3xPnJKMJVBDG81e/ztPqUExSgUKP1p8n3rkdoy52Zapue5xjwVKXgVdv0dJupg5+kferPG75aSO9zlmMIvD/+w92Zp6nU0Mkk/mEGsaaIBiW/yRK97NdAc=; 25:RlZrrTZhxRtiIMSIW3eFu1FXeu1plK9a5bUXcEHGM116/qGPET9EZThWJKfgo9Ct5B2zaHlMx298BNn2GWZrJ+0jYyl3w2MyDd69ghgB60A424ZV3esuHZYQzJCIQ38QA3q+KYzNM5FN9L8qn88yUktKSZ0H1TErbp0XJq9mzeP+5q9QiYU7UrWM95aA8Im+LCK/l9w4zlE6HB89IT2bw9LWfWQ85V0mYl87su707vrMH/4CFlsFamUMhkxOWlO7l9607gIV2SEzmQAzfZ4J95EIUCuwIEDaCC86/CoygzM0HRmMFd/R8EkgXKyieG9Q5ynKGpwEwnXpUe8NzlVtXg== X-MS-TrafficTypeDiagnostic: MWHPR02MB2608: X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB2608; 31:NZh+iBritqEF7OphKFTdPwizBLqOIGShgTIL/GOuvCkDVA1SedV91abikxybdcqJnuNT3ol7d3VJ21Gd3gY0fED7PApDKodPL1CH3LdA9u/jABFhgbmrVzdFiESglxBTRGEb5vSYpaRpPEGon7ne5GtIEVCpL2ibb4oszCauSf/yGkKk8JkqvsabiTjiAkAKrdj8ZZxlOv2EcdqbnFg+ye2jO5CTG3R901WrIYODUws=; 20:8H18Jby1tYnL5QDaz/7WIcl/OBSEHEOfWEXBZhMPIbZd/f33p/LYpgOutG5Q7o5xMty6cF+7VFUnQ5o2/cEtYFkfX6BouiCPvg2FjPFWN3TOCts4CPNYWgPQdlkcfinrpMH85AzsUwFU731vUAV34kmeGcIjSQEMu/Xd853DwfXD1Kn9QPOPhta3nnCm2HQ9a5Y/cV3R7P8Zk8EVzaXhuPtke7RSrjUpyciuEDVIce0q8qnazRoKtPvs3BQsA4rhbTbnCC18ogSAL0GyAjUG3Bj16CSUeSjypUQk9+BudYUJs60DipRDw6I2uH/ToHsKaapm9Je4JV6YsIxoubQe1to3KFTUynYnH3u15Yi9d+u8Vqc7lh71Io2Gs9BkNMvMuJ0iq6nxckZSf42IKS7Cgn5rKNjhMIPI4K2JDxRAXU8q5vU81aWF0uqSN6VIzN6iPgPLptBcMYE1CNSy5MHnfBaBeORGJFhjLvPXK9FCGNlFs8L3AHNYQ8Yxk279L+EkqNSmBh/a04GNWSoDqnNJrf4sQWT0syLWGWi23/ewaxThltT02QBNKMp5itiTWjK3Y1khrIIm9dQQGRgE1hdRA1On6gCtxzVq7dxb7VBBqD8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(72170198267865); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93004095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:MWHPR02MB2608; BCL:0; PCL:0; RULEID:; SRVR:MWHPR02MB2608; X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB2608; 4:lvPbFFH6p4H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26y1D4OeBSoz1oi0TmeGzbglmEP5SgKDbF+LYxJAoMJjAhSXPNArJLc/z7XWX40X5/qDdpxP1tHAa3nNFwzgzRQBCFaEyxLMhTofT49K0yTYA==; 5:Lso5jGKBVOgOF5h6H50N4PyimxHiyLi9DuUxZC9oEW0K3Zz8j/Php5m5NM1k+692IaZ4F2KPInNnhM2wvHqu4AJAFNnOx2xKWAX1f/BSriatAKWcx3l+jeORq7HyR5Wmo1QSRfc6JzGebFoZg3+MAc7iVHjOIxV91Rg+N3bS984=; 24:qmny6L6pWnwrkuobzYzFesk1pkDIaCoVlYQiLmh8c7OKNetusyWGaXCZsYNO1p82BMfhOuBkO5x+SV9WXB2hu9LvhUAhWSYL/+0yTrIZjAg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR02MB2608; 7:UEM9k++LjnvMaDABMQqfusjtbVXKAsVnG1o8lkeVgFLQC5NigFc5WXIkkQctn0RW021RCO2nuQhjFPZUILBSPuMQhsv8AQmxR0F/E9/6bHfIYyXYJX81pwEd37e0mtzUDu8+wmOvMQjEFrl7SO6/w+MV+TqQ8jLPV/VHBFre6uujFP7bOVzriBbmk5X/B879ImudRUovftpgpG2iq1q/8ZqP+R+GAupuEoEhTU+fNd3ug7vDrGNjcYLVa0hhtEFe X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2018 20:54:18.2416 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 973d87a0-b2bb-4770-456e-08d5d8825279 X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad; Ip=[208.19.100.23]; Helo=[AVMBX3.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR02MB2608 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver fails to set the correct queue depth for native devices, due to failing to set the device type prior to calling aac_set_safw_target_qd(). This results in slave configure setting the queue depth to 1. This causes around 30% performance degradation. Fixed by setting the dev type before trying to set queue depth. Reported-by: Steve Best Fixes: 0bcb45fb20c2a ("scsi: aacraid: Add helper function to set queue depth") cc: stable@vger.kernel.org Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll Reviewed-by: Ewan D. Milne --- drivers/scsi/aacraid/aachba.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index a9831bd37a73..a57f3a7d4748 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -1974,7 +1974,6 @@ static void aac_set_safw_attr_all_targets(struct aac_dev *dev) u32 lun_count, nexus; u32 i, bus, target; u8 expose_flag, attribs; - u8 devtype; lun_count = aac_get_safw_phys_lun_count(dev); @@ -1992,23 +1991,23 @@ static void aac_set_safw_attr_all_targets(struct aac_dev *dev) continue; if (expose_flag != 0) { - devtype = AAC_DEVTYPE_RAID_MEMBER; - goto update_devtype; + dev->hba_map[bus][target].devtype = + AAC_DEVTYPE_RAID_MEMBER; + continue; } if (nexus != 0 && (attribs & 8)) { - devtype = AAC_DEVTYPE_NATIVE_RAW; + dev->hba_map[bus][target].devtype = + AAC_DEVTYPE_NATIVE_RAW; dev->hba_map[bus][target].rmw_nexus = nexus; } else - devtype = AAC_DEVTYPE_ARC_RAW; + dev->hba_map[bus][target].devtype = + AAC_DEVTYPE_ARC_RAW; dev->hba_map[bus][target].scan_counter = dev->scan_counter; aac_set_safw_target_qd(dev, bus, target); - -update_devtype: - dev->hba_map[bus][target].devtype = devtype; } }