From patchwork Wed Jun 7 21:43:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9772927 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 8373960350 for ; Wed, 7 Jun 2017 21:44:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9240E2847A for ; Wed, 7 Jun 2017 21:44:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8729D284F8; Wed, 7 Jun 2017 21:44:21 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 889CC2847A for ; Wed, 7 Jun 2017 21:44:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751789AbdFGVoR (ORCPT ); Wed, 7 Jun 2017 17:44:17 -0400 Received: from mail-by2nam01on0077.outbound.protection.outlook.com ([104.47.34.77]:52642 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751574AbdFGVny (ORCPT ); Wed, 7 Jun 2017 17:43:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=rVN4HHdSBRYu4VA30VFPZDDaqEa/Am6HEs5hvUAU6K0=; b=i7Bmtb3UwTTcCB4gZjjlkLbJqHKUENmk9s2cPQL+wIx9V76mDS7f4QmcP9VHDfkDUQHX2rx3y8gCgRnOqWf5qEbVN2ngIJhVvXFlSt26AByPiiNF9sawZPiBtdJ8nDbPKiRNVZ7kn4b2f/iWrGyzdwcwbJSG+wPOhU8vXoULxL8= Received: from BY2PR07CA0090.namprd07.prod.outlook.com (2a01:111:e400:7bff::43) by DM2PR0701MB1018.namprd07.prod.outlook.com (2a01:111:e400:246f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Wed, 7 Jun 2017 21:43:52 +0000 Received: from BN1AFFO11FD028.protection.gbl (2a01:111:f400:7c10::137) by BY2PR07CA0090.outlook.office365.com (2a01:111:e400:7bff::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12 via Frontend Transport; Wed, 7 Jun 2017 21:43:52 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1AFFO11FD028.mail.protection.outlook.com (10.58.52.88) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1101.12 via Frontend Transport; Wed, 7 Jun 2017 21:43:51 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Wed, 7 Jun 2017 14:43:40 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id v57Lhej2023165; Wed, 7 Jun 2017 14:43:40 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v57Lheeh023164; Wed, 7 Jun 2017 14:43:40 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 05/15] qla2xxx: Add debug knob for user control workload Date: Wed, 7 Jun 2017 14:43:23 -0700 Message-ID: <20170607214333.23110-6-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170607214333.23110-1-himanshu.madhani@cavium.com> References: <20170607214333.23110-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39850400002)(39840400002)(39450400003)(39410400002)(39400400002)(2980300002)(428002)(189002)(199003)(9170700003)(356003)(8936002)(48376002)(50986999)(1076002)(8676002)(81166006)(50466002)(80596001)(189998001)(106466001)(105586002)(42186005)(4326008)(87636003)(76176999)(2906002)(6666003)(2950100002)(50226002)(478600001)(36756003)(5660300001)(305945005)(72206003)(101416001)(47776003)(86362001)(33646002)(107886003)(5003940100001)(54906002)(38730400002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB1018; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD028; 1:eCiV4CWkVhMpGrtyc7AmNQyMTQI0YshhTNUYxMhTS+WkUlJMvKEgJeXqCmcoyK3mOxy5AXFpvJQs91s3Wn05aVZe4Oxpv2iQJ94lOECOSNotnPVGnFDAO0rUgjoCnRcK4ZfrRpd96mj90LDrNTXMtJQlRK6TPfgpMZNTJyh1jjGaOP3ROzy4X823reMf/SCAh9976IPZ+u3eKsp/eh94zpyReJ5IKpPohAcEFphnwgJnjKCE9ci0wUMfqMPrRNBceBLtyNyEAFTXt3k0ol8pNWTiDXzNlFfYi8h+LSi/DzE8f8fLLVAE1nGPrcxxLj9Uw6jgtpXuLRmkw7FejoEJWkQCwCfFc5MhnHHi26D+UXYlLd7gmtnunCbacfPRdrsKdubz2G0C7BhQPObipvjeuv9r6syumTyQq9NUdJEBlTcDtn6wzTXG3ryXAwHNDWlZsP0s76RdIY+x+jcs0Sxp7zCMLr93aX7kOOb5mBfyJXQEVAOvp4HucYTN5PRhEJUZ X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR0701MB1018: X-MS-Office365-Filtering-Correlation-Id: bcf04085-2100-440b-5fa3-08d4adee49e5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:DM2PR0701MB1018; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 3:nhNyCwIO0SOnuG9+9VT/OKk9rf1sctfSFeZs8D+c06suyho2bCOB1ji4nfcbQ/0eZ7WUqAa/LRjOEd06T/gtotfjHsGMFm0f4Ugywcp5crreuItQxmrSncFRrN9PLdd6lMHshkr3WBCthI8Lpog8HoEO+iwkt7uOiPmnUA0W0rq5HB/BKUdcJtkeVGG8BWcIjbeE56npEehfIMxsRrWUWY9qfWXWmpQdqayhpTs+bD4rS1F2/0+KaIiOlGTnlrDPoY+VivZFeTzH02EfgKu4ZynMq/QbB3tvE/ShDh8DUX9Tinnas7IsvrDEs69OlZDnk/ZqIoEzqFb1Yk7DlPFlJp7Ei44gEK7gj7QexqjietxJBndH2n8gkeky/lIFp38u9wjF7wiQG8gdWnTiAmiqOSNEFSdR4rNgKg9n7IR2pF2Oa8AA4TkoRYmfyeV74OlnK5DBaoAgmL2on6X4WtArkA== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 25:N509+HRNrGIcBxlMT7kv5pw2NDZxE9qfycYwtGlpw+JS5C3cLOX6iSg2tP7ekhxa/rE9YK2E7cG3QC6X1Ph6Ufm3TY3sQiFZ61gMVQe0tfxXAEnhyRLYQ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8TQEaHZGrivfetFdzN7E6diiksWg/RwVBb58PyHpp8acMST5yi2+0/7nbmuEP/5BAGOKMyETUyg9zDcgKxFjWlmwdnPmzkHJvkqXxQpDDFgYjNvAVwCsBahZQzsCOUY6PE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0701MB1018; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0701MB1018; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB1018; 4:NlYBoEzjAY/GEu5S7YZDbzQtDLRpZKdFgoQMSZyK?= =?us-ascii?Q?1UTben6m2exas7XL0YilXnY77HXUNHU/vUNWGFDBN4MhZsBPHtSwEzbo+R2X?= =?us-ascii?Q?IDZkwJBBJy/QR5+xrhJ1owEayT0ZiulpiIE+SHP1pYfjD/xZeJtIh55dhWRb?= =?us-ascii?Q?UcDl4u9a2hmK2MOvbyTcJ08me3HoZiwboTSkTd+dZP31qzQeaaPHO+3L+6Lz?= =?us-ascii?Q?i8u44d5JNJWZTEFwxUFypQjMyYxXZr9E57IG3cuTb+cpA2q8JuVNCcllLcNq?= =?us-ascii?Q?gOquX4eDE2k4X6fenvyzscCfQ5GqseHValLwi/SRb1dYpDUKmyuITJ5Bt746?= =?us-ascii?Q?smQk/S4ZOuVjQ09pIOApaPJ0cCx2PEr8fJhRNQzrZNVfD8p6LTG1icvx3nc5?= =?us-ascii?Q?A/riHdcSm4N2Vcc8MT5MUoYmO2kz6bdxs1VCaFNPTUHkb6rMQXXtyjbO3fb6?= =?us-ascii?Q?030xfe9gi7e89X1py/Ml4fXKg4q4mhFml7VulV9qXqZQqXPAjiEhV1JupiOr?= =?us-ascii?Q?3sEIFZapOIENbQj6bCmzjtXDs00TSmkLCMX91GxZBV7jKtj0ntGDfu6CxQOP?= =?us-ascii?Q?maVED/ur6b2Zkywej0frdjEEqbfRV7N3lKg0P3sL1dH0Qo4TQaakMd3sTib2?= =?us-ascii?Q?tLZYXzl5U82vROZaBcLeNq64o9UdbTQCw4oYl7tr4d/9+foeAtniEH8tl7ab?= =?us-ascii?Q?OoY0jKU7qkLFDGzDqjrrHYAjG1Ex3FugkP/N6ywPWn41c4M7TW61eQcRHteN?= =?us-ascii?Q?LP7maZ8Hnc3EiCtMe/Jwi1Sgc0fIscLn525A5Xr9KPhGRSObDyQoSW8e0pwv?= =?us-ascii?Q?oMae56ipgEdFFSmyD31vGSWnA6irOLMXZJf4W2Q3jgAnIXOdLLBhbh+PtB/s?= =?us-ascii?Q?DXfeh9whFOq7d6ALX34QyP6WdMJProiDYFIB+pz02RhcRRDnu9Hakr/2LrqM?= =?us-ascii?Q?UwPHeffPKn8Y1LOMBDHqLwbWWxdVe1JSpElwNwt7H9smLGl7i2PR+neefFqZ?= =?us-ascii?Q?sotchPPGL8eMiF3Imp8UCCCjxr2OZSXW+gG24bJZ1h4NgpMzJMvip6Rb4Uj0?= =?us-ascii?Q?87j/JL4hbaBrlkmVGxkWI2z8/Y0gEtRtL/L+gepDhL9G6wpyOjL1WGlNEL+U?= =?us-ascii?Q?YelRUuaOt83sRQYGYzCfrRpquC69pBbr/Stv7xAOACwWQ+/NxnjS/2b88AS7?= =?us-ascii?Q?l3NAyIF1DxO0gtk=3D?= X-Forefront-PRVS: 03319F6FEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB1018; 23:CZdHHgKb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sQK4JkWp1V/CI0qeodUZVwbBLXhSMo/nhlx6aA2lnLSP1oGlSxqnp4k+VGx4a6Z6BZrNf3BYPE5FH+2QdB/G7IZ/mIFIdmNcdi7GiNe6BcqEu0B1IE7aEfPuCzd43nvvSCnWC57fXjGVaX3r0TiYr3ae7sn8BfgcMRIZqqOubaxZ0sA3VFM2W5tIhXnc+1803XrVesgTILWVPt+N+SAogRfAWlUQP4vFi305CU1NDiiYqIhdCpwDVDZL/KUgiqOvXH6swTED171y5l+pECQIfG1QSYADpVeiGZJONLuksM9fQBt7WTfVax/qwi5I2N3n4tVtbqHXAWTuBWphO; 24:xYvnW7M6zBP193e6k8zhIc8lgfqLw9NEvP7R8O5F3EELuMuQJzhpzKVZvlDf75aYJwGLMsv76Wo+V/hbxfNPm6UxTSb9cOTXncnk0N7rCzE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 7:U5Yts/ghu1HY3+CdQScZoB06hriFl4Sz39zfZUPk9JFiv41oMpiml5wZK9eeZ5YijptDg9t+Y008N81IQDqJCX07nxsyt5u1FSF37u6C4gaPHtJkawKL46KPs9E5KwMCPJRGk4bVcglqtYdf0bNxK6M/WbFtP3F9RpOpoYXoNcDFK1l0rQF8ibAz+6b0vawvZj05scxqvYFlXf1zi2m0fP8snfIrPPn7GDvD5zmlijVt6MIepN2JIbJJmh/NWNoF1kZUamYRM3AyKnkq8nTWLPpVA/U5IDPx1vNtsLQ+B507vMP4yd/mECv9YUBpeyGtHiX14OloRpyRWs4qUnfuBA== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2017 21:43:51.6397 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1018 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Quinn Tran For Target mode, user can control the work load by placing qla2xxx's irq vector on certain CPU via the smp_affinity settings. This patch allows user to control the number of QPair's irq to be active. The irqs are allocated at driver load time until unload. The work itself is placed on the QPair based on user setting. New module parameter ql2xuctrlirq is added for allowing user to control IRQ affinity. Usage: modprobe qla2xxx qlini_mode=disabled ql2xuctrlirq=1 mount -t debugfs none /sys/kernel/debug echo 2 > /sys/kernel/debug/qla2xxx/qla2xxx_[host num]/naqp echo [cpu id] > /proc/irq/[irq id]/smp_affinity_list Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 7 ++- drivers/scsi/qla2xxx/qla_dfs.c | 89 +++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_gbl.h | 2 + drivers/scsi/qla2xxx/qla_isr.c | 11 +++-- drivers/scsi/qla2xxx/qla_target.c | 32 ++++++++++++++ 5 files changed, 137 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 8b52f431a812..18b37c864250 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3322,6 +3322,7 @@ struct qlt_hw_data { struct dentry *dfs_tgt_sess; struct dentry *dfs_tgt_port_database; + struct dentry *dfs_naqp; struct list_head q_full_list; uint32_t num_pend_cmds; @@ -3330,7 +3331,8 @@ struct qlt_hw_data { spinlock_t q_full_lock; uint32_t leak_exchg_thresh_hold; spinlock_t sess_lock; - int rspq_vector_cpuid; + int num_act_qpairs; +#define DEFAULT_NAQP 2 spinlock_t atio_lock ____cacheline_aligned; struct btree_head32 host_map; }; @@ -4278,6 +4280,9 @@ enum nexus_wait_type { WAIT_LUN, }; +#define USER_CTRL_IRQ(_ha) (ql2xuctrlirq && QLA_TGT_MODE_ENABLED() && \ + (IS_QLA27XX(_ha) || IS_QLA83XX(_ha))) + #include "qla_target.h" #include "qla_gbl.h" #include "qla_dbg.h" diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c index 391c50be2297..63d7374dce77 100644 --- a/drivers/scsi/qla2xxx/qla_dfs.c +++ b/drivers/scsi/qla2xxx/qla_dfs.c @@ -314,6 +314,81 @@ static const struct file_operations dfs_fce_ops = { .release = qla2x00_dfs_fce_release, }; +static int +qla_dfs_naqp_show(struct seq_file *s, void *unused) +{ + struct scsi_qla_host *vha = s->private; + struct qla_hw_data *ha = vha->hw; + + seq_printf(s, "%d\n", ha->tgt.num_act_qpairs); + return 0; +} + +static int +qla_dfs_naqp_open(struct inode *inode, struct file *file) +{ + struct scsi_qla_host *vha = inode->i_private; + + return single_open(file, qla_dfs_naqp_show, vha); +} + +static ssize_t +qla_dfs_naqp_write(struct file *file, const char __user *buffer, + size_t count, loff_t *pos) +{ + struct seq_file *s = file->private_data; + struct scsi_qla_host *vha = s->private; + struct qla_hw_data *ha = vha->hw; + char *buf; + int rc = 0; + unsigned long num_act_qp; + + if (!(IS_QLA27XX(ha) || IS_QLA83XX(ha))) { + pr_err("host%ld: this adapter does not support Multi Q.", + vha->host_no); + return -EINVAL; + } + + if (!vha->flags.qpairs_available) { + pr_err("host%ld: Driver is not setup with Multi Q.", + vha->host_no); + return -EINVAL; + } + buf = memdup_user_nul(buffer, count); + if (IS_ERR(buf)) { + pr_err("host%ld: fail to copy user buffer.", + vha->host_no); + return PTR_ERR(buf); + } + + num_act_qp = simple_strtoul(buf, NULL, 0); + + if (num_act_qp >= vha->hw->max_qpairs) { + pr_err("User set invalid number of qpairs %lu. Max = %d", + num_act_qp, vha->hw->max_qpairs); + rc = -EINVAL; + goto out_free; + } + + if (num_act_qp != ha->tgt.num_act_qpairs) { + ha->tgt.num_act_qpairs = num_act_qp; + qlt_clr_qp_table(vha); + } + rc = count; +out_free: + kfree(buf); + return rc; +} + +static const struct file_operations dfs_naqp_ops = { + .open = qla_dfs_naqp_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .write = qla_dfs_naqp_write, +}; + + int qla2x00_dfs_setup(scsi_qla_host_t *vha) { @@ -391,6 +466,15 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha) goto out; } + if (IS_QLA27XX(ha) || IS_QLA83XX(ha)) { + ha->tgt.dfs_naqp = debugfs_create_file("naqp", + 0400, ha->dfs_dir, vha, &dfs_naqp_ops); + if (!ha->tgt.dfs_naqp) { + ql_log(ql_log_warn, vha, 0xd011, + "Unable to create debugFS naqp node.\n"); + goto out; + } + } out: return 0; } @@ -400,6 +484,11 @@ qla2x00_dfs_remove(scsi_qla_host_t *vha) { struct qla_hw_data *ha = vha->hw; + if (ha->tgt.dfs_naqp) { + debugfs_remove(ha->tgt.dfs_naqp); + ha->tgt.dfs_naqp = NULL; + } + if (ha->tgt.dfs_tgt_sess) { debugfs_remove(ha->tgt.dfs_tgt_sess); ha->tgt.dfs_tgt_sess = NULL; diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index f5493eda0110..beebf96c23d4 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -139,6 +139,7 @@ extern int ql2xexchoffld; extern int ql2xiniexchg; extern int ql2xfwholdabts; extern int ql2xmvasynctoatio; +extern int ql2xuctrlirq; extern int qla2x00_loop_reset(scsi_qla_host_t *); extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); @@ -856,5 +857,6 @@ void qla24xx_delete_sess_fn(struct work_struct *); void qlt_unknown_atio_work_fn(struct work_struct *); void qlt_update_host_map(struct scsi_qla_host *, port_id_t); void qlt_remove_target_resources(struct qla_hw_data *); +void qlt_clr_qp_table(struct scsi_qla_host *vha); #endif /* _QLA_GBL_H */ diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 9eb946cc8297..3c9f9aa7f2c2 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -3227,9 +3227,14 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) min_vecs++; } - ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs, - ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, - &desc); + if (USER_CTRL_IRQ(ha)) { + /* user wants to control IRQ setting for target mode */ + ret = pci_alloc_irq_vectors(ha->pdev, min_vecs, + ha->msix_count, PCI_IRQ_MSIX); + } else + ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs, + ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY, + &desc); if (ret < 0) { ql_log(ql_log_fatal, vha, 0x00c7, diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 8920b830722c..cbe6ff9f663e 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -66,6 +66,13 @@ MODULE_PARM_DESC(ql_dm_tgt_ex_pct, "the percentage of exchanges/cmds FW will allocate resources " "for Target mode."); +int ql2xuctrlirq = 1; +module_param(ql2xuctrlirq, int, 0644); +MODULE_PARM_DESC(ql2xuctrlirq, + "User to control IRQ placement via smp_affinity." + "Valid with qlini_mode=disabled." + "1(default): enable"); + int ql2x_ini_mode = QLA2XXX_INI_MODE_EXCLUSIVE; static int temp_sam_status = SAM_STAT_BUSY; @@ -4059,6 +4066,31 @@ static void qlt_do_work(struct work_struct *work) __qlt_do_work(cmd); } +void qlt_clr_qp_table(struct scsi_qla_host *vha) +{ + unsigned long flags; + struct qla_hw_data *ha = vha->hw; + struct qla_tgt *tgt = vha->vha_tgt.qla_tgt; + void *node; + u64 key = 0; + + ql_log(ql_log_info, vha, 0x706c, + "User update Number of Active Qpairs %d\n", + ha->tgt.num_act_qpairs); + + spin_lock_irqsave(&ha->tgt.atio_lock, flags); + + btree_for_each_safe64(&tgt->lun_qpair_map, key, node) + btree_remove64(&tgt->lun_qpair_map, key); + + ha->base_qpair->lun_cnt = 0; + for (key = 0; key < ha->max_qpairs; key++) + if (ha->queue_pair_map[key]) + ha->queue_pair_map[key]->lun_cnt = 0; + + spin_unlock_irqrestore(&ha->tgt.atio_lock, flags); +} + static void qlt_assign_qpair(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd) {