From patchwork Wed Jun 14 03:47:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9785223 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 6C5D6602DC for ; Wed, 14 Jun 2017 03:48:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C25D27FA3 for ; Wed, 14 Jun 2017 03:48:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F3872858D; Wed, 14 Jun 2017 03:48:12 +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 2E7BF2858E for ; Wed, 14 Jun 2017 03:48:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754161AbdFNDsI (ORCPT ); Tue, 13 Jun 2017 23:48:08 -0400 Received: from mail-by2nam03on0056.outbound.protection.outlook.com ([104.47.42.56]:34064 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754129AbdFNDsD (ORCPT ); Tue, 13 Jun 2017 23:48:03 -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=3gphKWFvZel9r1GXB9LykAL7q9luRUZoMgqS4rWk8pI=; b=DGYkj4g3rAiqeRguP5BkchFgHA/ghPKSZMjhhEc0yTHdC5cDAagQB0mYJHgLIaTwKHlqFieTqUPdn8msV25ocsTMd1OqJOlyt7JTmiKhnoFwcC02HRyE6z1dXYREMKeqSQ5x5zJMSBI9SprZzcuVzALVk4+CwUOtkm+JjxOCttQ= Received: from SN1PR0701CA0057.namprd07.prod.outlook.com (2a01:111:e400:52fd::25) by DM2PR07MB429.namprd07.prod.outlook.com (2a01:111:e400:243a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Wed, 14 Jun 2017 03:48:01 +0000 Received: from BL2FFO11FD009.protection.gbl (2a01:111:f400:7c09::150) by SN1PR0701CA0057.outlook.office365.com (2a01:111:e400:52fd::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14 via Frontend Transport; Wed, 14 Jun 2017 03:48:00 +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 BL2FFO11FD009.mail.protection.outlook.com (10.173.161.15) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1143.11 via Frontend Transport; Wed, 14 Jun 2017 03:47:58 +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; Tue, 13 Jun 2017 20:47:49 -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 v5E3lnfL015475; Tue, 13 Jun 2017 20:47:49 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v5E3lnIl015474; Tue, 13 Jun 2017 20:47:49 -0700 From: Himanshu Madhani To: , CC: , , Subject: [PATCH v2 03/15] qla2xxx: Enable Target Multi Queue Date: Tue, 13 Jun 2017 20:47:18 -0700 Message-ID: <20170614034730.15428-4-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170614034730.15428-1-himanshu.madhani@cavium.com> References: <20170614034730.15428-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)(39450400003)(39850400002)(39400400002)(39410400002)(39840400002)(2980300002)(428002)(189002)(199003)(9170700003)(2950100002)(86362001)(36756003)(8936002)(50986999)(47776003)(8676002)(4326008)(50466002)(101416001)(478600001)(48376002)(80596001)(356003)(5660300001)(76176999)(72206003)(6666003)(5003940100001)(81166006)(1076002)(54906002)(105586002)(42186005)(38730400002)(305945005)(87636003)(33646002)(189998001)(50226002)(106466001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB429; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD009; 1:dZSqdiUDVsuU4+g1m0yXNrOO+uV78nTil66XcHFxAQ4NRVEoVrbcCb2b3u2dViof8Cmg/QfERjZdoPEEOrYPw5sEpwKfESsW10kLt0qZyrzREwq42GB6ADLg6mtAmBWjjnD2gJj1rGxV7uooTYRf0Bu96+6p6LSFNDYPddx5JqbWp1wInyXoG0B2wam4Dq/csRuyH0Q5s9DCGeDYGr94/5KbLxl5TLBj+VK0r16M7jNyGUlSNOqZ0UzOBsnBUFMW7xj2vQLPIhaY7+zZ4Dc4SOT75dpJlmr1TY3tF+sq1YmcgqNnc22yhsFC/hF5f3jZEHrg5GttspKzeARAWxzAFv4+az4sQJOxQd9ktb7bHclYHf4+DUNLTivQ72HHcJaA29TwquUrh7xjFpq9ENwZEf7cNOQZh6V4Fysak9wLDQLHD5a/vhyoKei07TVsClf+XcUJUCLSUguqNofQTrhVmdeg030dXpot5ymwTSFsil2W3r1aoXorp/SBVY3+rGoznGIfV76PubqJ2tEar6bYMw== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR07MB429: X-MS-Office365-Filtering-Correlation-Id: c8127020-d7e2-41db-dcde-08d4b2d826c9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DM2PR07MB429; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB429; 3:6dLO3zMbFOhWJB7ApMGM+sFozm2nV2NAbgfsX5Bl/dvcLEurQ19tdzos4KhIZa1P33k/IiQcyrGoDyWq1rhYQA7AOfsCgqohYznil2sYuOBzs4FeBKUlNRny+m2txFMuSo4WiKhRQCJLf7/ynVyf7muDADNiLikzTdhUP/bssuaGgHe7sH+Hfse5hnJgahbY1FYBD9ZMl3N5vxPBL5ERw2iz/m0+BnxNHJu72nfkE/SQsgmm6jMzS31zNZzcgRP8U5gKonjZMRDFlGDc/eRqn+LaKef1cObAc2Uf5HSt1P9ImzvO9twVQFf905qd661WO5w/TgX+kV4jAoRhqwhcLdd7unVek1OdC2LwBez+jGgX08rW8z4jOudWWfiXK3rXVJdWIdfYhSvBgLoFJiShTVxCVK+nFP4EABshahUEhMCidhPzZ9sIQrnjpJx0egmdEsyx5T5RPQRHf5RHz/Ob9W2U/GEIH0lEGomhh4OK6YTF5VzBp9qw+MJK0J1GQmXZ X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB429; 25:i9gp4P/3Z1XXbtHHVOVS+xbQtBeZ3WLnZ1KVJTgfUciz9C4Kl4ju4+e12DgTqByxxFP5PnzskxXM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KEJlRTXqeuxgJfXWDeMtkXzknGqhiO1NNZKgCgBBjy0aPRlBCqOjFGl6SZbRAYkKAk9RcpxPGX9MbV4oo8+Ux9NrhlDWkTQD9aaIe8nCELFWIPKuJ8KuR1/3g+iLMxZghuJ+igpGwsh 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)(13016025)(13018025)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR07MB429; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR07MB429; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR07MB429; 4:oLrvwpPI92Y5L8P8gPqIQx+StdqwwdhxZglf6FtilYT?= =?us-ascii?Q?qrz/3GDwR1wKx2ZXr9e83pMEjqXXUioPN9UXxmoYj5kLDV5PXBWc99CdiJ8V?= =?us-ascii?Q?vcLvLZt/2Q93DSPPMFUquW6WKlnJPMz1vm0F9uHPsbJ+tAuISb6Wrt54rhHx?= =?us-ascii?Q?bKtyuca8hrnUZxYkP5R6Ah28bG37hkDoZr+5p6t+GChoQ6lYoaKFry4RMGH9?= =?us-ascii?Q?pMlF7qeCp2aQlLlkWoCjIfLNgdaovTFAGzNVx/RAj6FrrHwTUHF8tG+mDm90?= =?us-ascii?Q?jKvUK1vXouYPRKfZ0S5IKS/QCcz/NAYeLOx0ZFcOArMJL1JcfbvNX5vkiwGh?= =?us-ascii?Q?QNubHjgrBryE6ZR/ncFcn0sW60GVZt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Gjzm?= =?us-ascii?Q?Jk18LQfGEYupemLIpnNslz5DAR3TdZlETU2shhq37mwVgECRGn3KpuUSCPRc?= =?us-ascii?Q?lQtvBsjnIN2fHGSGbENFx/nCP5oXs7XRSXAxRx/cmCCAtk2x08Zlkv2nrhuk?= =?us-ascii?Q?1V55Ht/qbeDTP75ZHdn7zkqWFG1A6VfiJ9RcL8lyrew5h4RtDL8XcQsOqDLZ?= =?us-ascii?Q?JDq/BDSTPb3f5Q3ttFrz+YOuNb?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB429; 6:XUv5QKti36yYf8oFBMxRCIbjZFKRUcn3tZHms0MAINNl/KAshIDEeq12pC/BTzde/8e198ink9y/HXhnEnKLLQ9ZfzykKEf/GitGKdOKiWqREbTjlGCVY8hyQKiGLCSXHuuoJag5qKgSW27xXAM2G4IKUtXwOQ8y8m9IMaTxcjCBQ3Ssar99Exon87h7oUPihjBtcWn2eubHvVoUUDK0/0tMv1UAoSUP0U2q0oBBexvpEXduyYdbJ0cy++LWQrklxQ9JFmFqzM2lw4qB566lfodJpt6or3UJ0I2N+goDNxNQUPpsW3T3iQcg/GNLks/JxfBQJ9BNVVxwZXUKzInHFHJKAgz55p93XS+vjzmixqQ2T5ADqueFZ5j7RFVkOeNYqjpAviZi2zRjv0n+CrkbsutmB5Y3k9CNk/AgsuMPxwftl44yUFQxu2AoEvMMdaylfV25XhrSnrTl4M/vYMNpO6T2IKWoXOuK/5tNI5kDAojmcl5aTZLn1GKQ8afJSlVDui8y2D48lsx4qjDwiLx5qg== X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB429; 5:rjwXnQssyHUwytS59qUbiGuz/XDePieOxADp66GvT8+1oAfvkGwaX2DRdBx/BSPrLfZ4NakwSAoGjZmtaLFPUa/HARN6w/xABajK0igqFLShCvrpf/ichWUdAcxY1AC3Ziz8KFX31BQi18TBLRqmmsIlBtW46pUNs+XcuWF6QriY/L5+gT7d0yGlDVbAvIQ6UFTt8pUzwg1lQawGfiIne7H7jEpW7ngIe1t0cWFChZ/5wBl0ihLK9BA67U0L2t4A2S/sl4fIl2xtcvj+hmKNsOkTemm3Sor1i93xhuTai6b7BImumWvztc23kXiimGrh7q9zredfpDe1Ts+uw2h/Bv7CXof1eTEPSrLBX3i5bDVklla2/j42L7V4qZrcZF76wtYVAvt1nnPzHKwaGzJvU279ICF5+Uc09goZA8Z66gvJqpOyXH5jD103ng1Oc1jHTiSawVi/2gls7KbAHWyR7tGJK62i1MyBAw2PBE3VbvT2a86+7tKQfjbRFz4Sllob; 24:6/W6ZamE1G/8sBzhmSnzIai8u9HyR3o0F5/9xu/pZfoFX2s+CCnxp8p/sJ4pobmXquwV6vbAoWFPbUeDu7OqanUgp8oRlqyuj9acPj4tGGg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB429; 7:abmEIB0aXsEnrLvV9F/9ghna2PQ+/GlD1Sd67yhFV0GJ46gZhiMBeeJVAdK4OrX9SwbaFFD9SJUtwqZOznMVSfGBWXsS4nCk0R0rgFLnO0Mt7IQAFzS6aC9EmRgQpbIKan1XAUdxAVfY38AAt+txqfPHoAOgllgPPVhTk75pV6L8kaJoIef6If0rVBesJqs3MhHduYn3X4w6aNLWoIeNVjbk21CGPg2I87oYSv/AOEv8c22cLi1SW5h4BCh6TvAZIDImMHUuv1gZ/sfFt8UYZobQ0kHB+0/A+pG5bCFcU+Zwdvp4trENbXyq+FN8HA63bMlrQ9Y3Pbk8FOOP09tlhw== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2017 03:47:58.4550 (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: DM2PR07MB429 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 Enable Multi Queue for Target mode. At Initiator LUN scan time, each LUN is assign to a QPair. Each QPair is affinitize to certain CPU. When new cmd arrives from the wire, the lunid is used to search for qpair. The qpair's affinitized cpuid will be used to queue up the work element. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 3 +- drivers/scsi/qla2xxx/qla_init.c | 3 + drivers/scsi/qla2xxx/qla_inline.h | 28 +++++++ drivers/scsi/qla2xxx/qla_isr.c | 21 +++-- drivers/scsi/qla2xxx/qla_os.c | 56 +++++++++----- drivers/scsi/qla2xxx/qla_target.c | 157 ++++++++++++++++++++++++++++++++++++-- drivers/scsi/qla2xxx/qla_target.h | 10 ++- 7 files changed, 240 insertions(+), 38 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 64109134e276..005ca2de3795 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -3245,7 +3245,7 @@ struct req_que { struct qla_qpair { spinlock_t qp_lock; atomic_t ref_count; - + uint32_t lun_cnt; /* * For qpair 0, qp_lock_ptr will point at hardware_lock due to * legacy code. For other Qpair(s), it will point at qp_lock. @@ -3275,6 +3275,7 @@ struct qla_qpair { struct qla_hw_data *hw; struct work_struct q_work; struct list_head qp_list_elem; /* vha->qp_list */ + struct list_head hints_list; uint16_t cpuid; }; diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 7d0847b3d190..fa5e6ab8e4a7 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -7623,6 +7623,7 @@ struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *vha, int qos, ha->queue_pair_map[qpair_id] = qpair; qpair->id = qpair_id; qpair->vp_idx = vp_idx; + INIT_LIST_HEAD(&qpair->hints_list); for (i = 0; i < ha->msix_count; i++) { msix = &ha->msix_entries[i]; @@ -7666,6 +7667,8 @@ struct qla_qpair *qla2xxx_create_qpair(struct scsi_qla_host *vha, int qos, qpair->req = ha->req_q_map[req_id]; qpair->rsp->req = qpair->req; qpair->rsp->qpair = qpair; + /* init qpair to this cpu. Will adjust at run time. */ + qla_cpu_update(qpair, smp_processor_id()); if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) { if (ha->fw_attributes & BIT_4) diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 99028d48c664..bd8cb796f64e 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -324,3 +324,31 @@ qla_is_exch_offld_enabled(struct scsi_qla_host *vha) else return false; } + +static inline void +qla_cpu_update(struct qla_qpair *qpair, uint16_t cpuid) +{ + qpair->cpuid = cpuid; + + if (!list_empty(&qpair->hints_list)) { + struct qla_qpair_hint *h; + + list_for_each_entry(h, &qpair->hints_list, hint_elem) + h->cpuid = qpair->cpuid; + } +} + +static inline struct qla_qpair_hint * +qla_qpair_to_hint(struct qla_tgt *tgt, struct qla_qpair *qpair) +{ + struct qla_qpair_hint *h; + u16 i; + + for (i = 0; i < tgt->ha->max_qpairs + 1; i++) { + h = &tgt->qphints[i]; + if (h->qpair == qpair) + return h; + } + + return NULL; +} diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 1535a29a9d9f..9eb946cc8297 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -2761,6 +2762,9 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha, if (!ha->flags.fw_started) return; + if (rsp->qpair->cpuid != smp_processor_id()) + qla_cpu_update(rsp->qpair, smp_processor_id()); + while (rsp->ring_ptr->signature != RESPONSE_PROCESSED) { pkt = (struct sts_entry_24xx *)rsp->ring_ptr; @@ -3196,10 +3200,10 @@ struct qla_init_msix_entry { }; static const struct qla_init_msix_entry msix_entries[] = { - { "qla2xxx (default)", qla24xx_msix_default }, - { "qla2xxx (rsp_q)", qla24xx_msix_rsp_q }, - { "qla2xxx (atio_q)", qla83xx_msix_atio_q }, - { "qla2xxx (qpair_multiq)", qla2xxx_msix_rsp_q }, + { "default", qla24xx_msix_default }, + { "rsp_q", qla24xx_msix_rsp_q }, + { "atio_q", qla83xx_msix_atio_q }, + { "qpair_multiq", qla2xxx_msix_rsp_q }, }; static const struct qla_init_msix_entry qla82xx_msix_entries[] = { @@ -3279,7 +3283,7 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) qentry->handle = rsp; rsp->msix = qentry; scnprintf(qentry->name, sizeof(qentry->name), - "%s", msix_entries[i].name); + "qla2xxx%lu_%s", vha->host_no, msix_entries[i].name); if (IS_P3P_TYPE(ha)) ret = request_irq(qentry->vector, qla82xx_msix_entries[i].handler, @@ -3287,7 +3291,7 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) else ret = request_irq(qentry->vector, msix_entries[i].handler, - 0, msix_entries[i].name, rsp); + 0, qentry->name, rsp); if (ret) goto msix_register_fail; qentry->have_irq = 1; @@ -3303,11 +3307,12 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) rsp->msix = qentry; qentry->handle = rsp; scnprintf(qentry->name, sizeof(qentry->name), - "%s", msix_entries[QLA_ATIO_VECTOR].name); + "qla2xxx%lu_%s", vha->host_no, + msix_entries[QLA_ATIO_VECTOR].name); qentry->in_use = 1; ret = request_irq(qentry->vector, msix_entries[QLA_ATIO_VECTOR].handler, - 0, msix_entries[QLA_ATIO_VECTOR].name, rsp); + 0, qentry->name, rsp); qentry->have_irq = 1; } diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 82bbb6432f77..3963602aef35 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -371,6 +371,23 @@ static int qla2x00_alloc_queues(struct qla_hw_data *ha, struct req_que *req, goto fail_rsp_map; } + ha->base_qpair = kzalloc(sizeof(struct qla_qpair), GFP_KERNEL); + if (ha->base_qpair == NULL) { + ql_log(ql_log_warn, vha, 0x00e0, + "Failed to allocate base queue pair memory.\n"); + goto fail_base_qpair; + } + + rsp->qpair = ha->base_qpair; + rsp->req = req; + ha->base_qpair->req = req; + ha->base_qpair->rsp = rsp; + ha->base_qpair->vha = vha; + ha->base_qpair->qp_lock_ptr = &ha->hardware_lock; + ha->base_qpair->msix = &ha->msix_entries[QLA_MSIX_RSP_Q]; + INIT_LIST_HEAD(&ha->base_qpair->hints_list); + qla_cpu_update(rsp->qpair, smp_processor_id()); + if (ql2xmqsupport && ha->max_qpairs) { ha->queue_pair_map = kcalloc(ha->max_qpairs, sizeof(struct qla_qpair *), GFP_KERNEL); @@ -379,23 +396,8 @@ static int qla2x00_alloc_queues(struct qla_hw_data *ha, struct req_que *req, "Unable to allocate memory for queue pair ptrs.\n"); goto fail_qpair_map; } - ha->base_qpair = kzalloc(sizeof(struct qla_qpair), GFP_KERNEL); - if (ha->base_qpair == NULL) { - ql_log(ql_log_warn, vha, 0x00e0, - "Failed to allocate base queue pair memory.\n"); - goto fail_base_qpair; - } - ha->base_qpair->req = req; - ha->base_qpair->rsp = rsp; } - rsp->qpair = ha->base_qpair; - rsp->req = req; - ha->base_qpair->vha = vha; - ha->base_qpair->qp_lock_ptr = &ha->hardware_lock; - ha->queue_pair_map[0] = ha->base_qpair; - set_bit(0, ha->qpair_qid_map); - /* * Make sure we record at least the request and response queue zero in * case we need to free them if part of the probe fails. @@ -2009,7 +2011,7 @@ qla83xx_iospace_config(struct qla_hw_data *ha) /* Read MSIX vector size of the board */ pci_read_config_word(ha->pdev, QLA_83XX_PCI_MSIX_CONTROL, &msix); - ha->msix_count = msix + 1; + ha->msix_count = (msix & PCI_MSIX_FLAGS_QSIZE) + 1; /* * By default, driver uses at least two msix vectors * (default & rspq) @@ -3125,12 +3127,26 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) host->can_queue, base_vha->req, base_vha->mgmt_svr_loop_id, host->sg_tablesize); - if (ha->mqenable && qla_ini_mode_enabled(base_vha)) { + if (ha->mqenable) { + bool mq = false; + bool startit = false; ha->wq = alloc_workqueue("qla2xxx_wq", WQ_MEM_RECLAIM, 1); - /* Create start of day qpairs for Block MQ */ - if (shost_use_blk_mq(host)) { + + if (QLA_TGT_MODE_ENABLED()) { + mq = true; + startit = false; + } + + if ((ql2x_ini_mode == QLA2XXX_INI_MODE_ENABLED) && + shost_use_blk_mq(host)) { + mq = true; + startit = true; + } + + if (mq) { + /* Create start of day qpairs for Block MQ */ for (i = 0; i < ha->max_qpairs; i++) - qla2xxx_create_qpair(base_vha, 5, 0, true); + qla2xxx_create_qpair(base_vha, 5, 0, startit); } } diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index ffe3aaa53f80..8920b830722c 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1515,6 +1515,10 @@ EXPORT_SYMBOL(qlt_stop_phase2); static void qlt_release(struct qla_tgt *tgt) { scsi_qla_host_t *vha = tgt->vha; + void *node; + u64 key = 0; + u16 i; + struct qla_qpair_hint *h; if ((vha->vha_tgt.qla_tgt != NULL) && !tgt->tgt_stop && !tgt->tgt_stopped) @@ -1523,6 +1527,24 @@ static void qlt_release(struct qla_tgt *tgt) if ((vha->vha_tgt.qla_tgt != NULL) && !tgt->tgt_stopped) qlt_stop_phase2(tgt); + for (i = 0; i < vha->hw->max_qpairs + 1; i++) { + unsigned long flags; + + h = &tgt->qphints[i]; + if (h->qpair) { + spin_lock_irqsave(h->qpair->qp_lock_ptr, flags); + list_del(&h->hint_elem); + spin_unlock_irqrestore(h->qpair->qp_lock_ptr, flags); + h->qpair = NULL; + } + } + kfree(tgt->qphints); + + btree_for_each_safe64(&tgt->lun_qpair_map, key, node) + btree_remove64(&tgt->lun_qpair_map, key); + + btree_destroy64(&tgt->lun_qpair_map); + vha->vha_tgt.qla_tgt = NULL; ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00d, @@ -2354,9 +2376,8 @@ static int qlt_24xx_build_ctio_pkt(struct qla_qpair *qpair, * the session and, so, the command. */ return -EAGAIN; - } else { - vha->req->outstanding_cmds[h] = (srb_t *)prm->cmd; - } + } else + qpair->req->outstanding_cmds[h] = (srb_t *)prm->cmd; pkt->handle = MAKE_HANDLE(qpair->req->id, h); pkt->handle |= CTIO_COMPLETION_HANDLE_MARK; @@ -3976,8 +3997,6 @@ static void __qlt_do_work(struct qla_tgt_cmd *cmd) spin_lock_init(&cmd->cmd_lock); cdb = &atio->u.isp24.fcp_cmnd.cdb[0]; cmd->se_cmd.tag = atio->u.isp24.exchange_addr; - cmd->unpacked_lun = scsilun_to_int( - (struct scsi_lun *)&atio->u.isp24.fcp_cmnd.lun); if (atio->u.isp24.fcp_cmnd.rddata && atio->u.isp24.fcp_cmnd.wrdata) { @@ -4040,6 +4059,85 @@ static void qlt_do_work(struct work_struct *work) __qlt_do_work(cmd); } +static void qlt_assign_qpair(struct scsi_qla_host *vha, + struct qla_tgt_cmd *cmd) +{ + struct qla_qpair *qpair, *qp; + struct qla_tgt *tgt = vha->vha_tgt.qla_tgt; + struct qla_qpair_hint *h; + + if (vha->flags.qpairs_available) { + h = btree_lookup64(&tgt->lun_qpair_map, cmd->unpacked_lun); + if (unlikely(!h)) { + /* spread lun to qpair ratio evently */ + int lcnt = 0, rc; + struct scsi_qla_host *base_vha = + pci_get_drvdata(vha->hw->pdev); + + qpair = vha->hw->base_qpair; + if (qpair->lun_cnt == 0) { + qpair->lun_cnt++; + h = qla_qpair_to_hint(tgt, qpair); + BUG_ON(!h); + rc = btree_insert64(&tgt->lun_qpair_map, + cmd->unpacked_lun, h, GFP_ATOMIC); + if (rc) { + qpair->lun_cnt--; + ql_log(ql_log_info, vha, 0xd037, + "Unable to insert lun %llx into lun_qpair_map\n", + cmd->unpacked_lun); + } + goto out; + } else { + lcnt = qpair->lun_cnt; + } + + h = NULL; + list_for_each_entry(qp, &base_vha->qp_list, + qp_list_elem) { + if (qp->lun_cnt == 0) { + qp->lun_cnt++; + h = qla_qpair_to_hint(tgt, qp); + BUG_ON(!h); + rc = btree_insert64(&tgt->lun_qpair_map, + cmd->unpacked_lun, h, GFP_ATOMIC); + if (rc) { + qp->lun_cnt--; + ql_log(ql_log_info, vha, 0xd038, + "Unable to insert lun %llx into lun_qpair_map\n", + cmd->unpacked_lun); + } + qpair = qp; + goto out; + } else { + if (qp->lun_cnt < lcnt) { + lcnt = qp->lun_cnt; + qpair = qp; + continue; + } + } + } + BUG_ON(!qpair); + qpair->lun_cnt++; + h = qla_qpair_to_hint(tgt, qpair); + BUG_ON(!h); + rc = btree_insert64(&tgt->lun_qpair_map, + cmd->unpacked_lun, h, GFP_ATOMIC); + if (rc) { + qpair->lun_cnt--; + ql_log(ql_log_info, vha, 0xd039, + "Unable to insert lun %llx into lun_qpair_map\n", + cmd->unpacked_lun); + } + } + } else { + h = &tgt->qphints[0]; + } +out: + cmd->qpair = h->qpair; + cmd->se_cmd.cpuid = h->cpuid; +} + static struct qla_tgt_cmd *qlt_get_tag(scsi_qla_host_t *vha, struct fc_port *sess, struct atio_from_isp *atio) @@ -4069,8 +4167,9 @@ static struct qla_tgt_cmd *qlt_get_tag(scsi_qla_host_t *vha, cmd->jiffies_at_alloc = get_jiffies_64(); cmd->reset_count = vha->hw->chip_reset; - cmd->qpair = vha->hw->base_qpair; - cmd->se_cmd.cpuid = cmd->qpair->cpuid; + cmd->unpacked_lun = scsilun_to_int( + (struct scsi_lun *)&atio->u.isp24.fcp_cmnd.lun); + qlt_assign_qpair(vha, cmd); return cmd; } @@ -4218,7 +4317,9 @@ static int qlt_handle_cmd_for_atio(struct scsi_qla_host *vha, spin_unlock_irqrestore(&vha->cmd_list_lock, flags); INIT_WORK(&cmd->work, qlt_do_work); - if (ha->msix_count) { + if (vha->flags.qpairs_available) { + queue_work_on(cmd->se_cmd.cpuid, qla_tgt_wq, &cmd->work); + } else if (ha->msix_count) { if (cmd->atio.u.isp24.fcp_cmnd.rddata) queue_work_on(smp_processor_id(), qla_tgt_wq, &cmd->work); @@ -5950,6 +6051,8 @@ static void qlt_sess_work_fn(struct work_struct *work) int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha) { struct qla_tgt *tgt; + int rc, i; + struct qla_qpair_hint *h; if (!QLA_TGT_MODE_ENABLED()) return 0; @@ -5972,9 +6075,47 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha) return -ENOMEM; } + tgt->qphints = kzalloc((ha->max_qpairs + 1) * + sizeof(struct qla_qpair_hint), GFP_KERNEL); + if (!tgt->qphints) { + kfree(tgt); + ql_log(ql_log_warn, base_vha, 0x0197, + "Unable to allocate qpair hints.\n"); + return -ENOMEM; + } + if (!(base_vha->host->hostt->supported_mode & MODE_TARGET)) base_vha->host->hostt->supported_mode |= MODE_TARGET; + rc = btree_init64(&tgt->lun_qpair_map); + if (rc) { + kfree(tgt->qphints); + kfree(tgt); + ql_log(ql_log_info, base_vha, 0x0198, + "Unable to initialize lun_qpair_map btree\n"); + return -EIO; + } + h = &tgt->qphints[0]; + h->qpair = ha->base_qpair; + INIT_LIST_HEAD(&h->hint_elem); + h->cpuid = ha->base_qpair->cpuid; + list_add_tail(&h->hint_elem, &ha->base_qpair->hints_list); + + for (i = 0; i < ha->max_qpairs; i++) { + unsigned long flags; + + struct qla_qpair *qpair = ha->queue_pair_map[i]; + h = &tgt->qphints[i + 1]; + INIT_LIST_HEAD(&h->hint_elem); + if (qpair) { + h->qpair = qpair; + spin_lock_irqsave(qpair->qp_lock_ptr, flags); + list_add_tail(&h->hint_elem, &qpair->hints_list); + spin_unlock_irqrestore(qpair->qp_lock_ptr, flags); + h->cpuid = qpair->cpuid; + } + } + tgt->ha = ha; tgt->vha = base_vha; init_waitqueue_head(&tgt->waitQ); diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h index 9519eeca1997..22c783e3e38f 100644 --- a/drivers/scsi/qla2xxx/qla_target.h +++ b/drivers/scsi/qla2xxx/qla_target.h @@ -787,10 +787,18 @@ struct qla_port_24xx_data { uint16_t reserved; }; +struct qla_qpair_hint { + struct list_head hint_elem; + struct qla_qpair *qpair; + u16 cpuid; + uint8_t cmd_cnt; +}; + struct qla_tgt { struct scsi_qla_host *vha; struct qla_hw_data *ha; - + struct btree_head64 lun_qpair_map; + struct qla_qpair_hint *qphints; /* * To sync between IRQ handlers and qlt_target_release(). Needed, * because req_pkt() can drop/reaquire HW lock inside. Protected by