From patchwork Wed Jun 7 21:43:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9772899 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 E4C6B60350 for ; Wed, 7 Jun 2017 21:43:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F34412848D for ; Wed, 7 Jun 2017 21:43:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7A11284F6; Wed, 7 Jun 2017 21:43:59 +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 C461E284F4 for ; Wed, 7 Jun 2017 21:43:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751680AbdFGVn4 (ORCPT ); Wed, 7 Jun 2017 17:43:56 -0400 Received: from mail-bl2nam02on0074.outbound.protection.outlook.com ([104.47.38.74]:43904 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751527AbdFGVnw (ORCPT ); Wed, 7 Jun 2017 17:43:52 -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=ufTi4r1vcg+nq1DaM04HoKQImhTda/QXQshXACXpnYg=; b=jqDlmwK9QqL4urin/SUSaxni5l0t7G4XruKJCnLLVE5UNMn9dIYA/czu8lowJHNV8lOC4d5Bs5a6mXvD8+2hcFOlIoCnLY9tqRRP11GejzWoZgkdpd0BkTQxuLtxE1rZNs/egS+SiUkdaz8IUr1dMIkBusOpOqHkW/TJUYHK1o8= Received: from BY2PR07CA0092.namprd07.prod.outlook.com (10.166.107.45) by BLUPR0701MB1011.namprd07.prod.outlook.com (10.160.34.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Wed, 7 Jun 2017 21:43:49 +0000 Received: from BN1AFFO11FD028.protection.gbl (2a01:111:f400:7c10::162) by BY2PR07CA0092.outlook.office365.com (2a01:111:e400:7bff::45) 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:49 +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:48 +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 v57Lhefs023157; 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 v57LhelB023156; Wed, 7 Jun 2017 14:43:40 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 03/15] qla2xxx: Enable Target Multi Queue Date: Wed, 7 Jun 2017 14:43:21 -0700 Message-ID: <20170607214333.23110-4-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)(39450400003)(39840400002)(39410400002)(39850400002)(39400400002)(2980300002)(428002)(189002)(199003)(9170700003)(8676002)(1076002)(2950100002)(50226002)(8936002)(356003)(54906002)(87636003)(478600001)(5660300001)(81166006)(48376002)(6666003)(50466002)(4326008)(72206003)(38730400002)(305945005)(107886003)(2906002)(86362001)(5003940100001)(36756003)(42186005)(189998001)(50986999)(33646002)(105586002)(76176999)(101416001)(106466001)(47776003)(80596001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1011; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD028; 1:VeYmTVs79D0to0esNZXcBYyQX5iey3ngEwUhvP7U6FanC4mk4D+DK5ADDj42Gcy4UT5zJCCyU/Bm3a2EgghsBHrcK+cF9Lr2Z5Q9fFOay/9ABcs8nkNEKY09T8LYyws221bCYa4eeV05c5uZ4GBlpN8M/erdVlMLAvdwXhgH2mNmeZZHMVh29XTHSKOViq4JjWcgsjH79VBwIPKi79A1hj+SBtljqs/6yaap8BbSGUkc+hsQhcEG5pT7PAFbQIHXuYaMV/mKYRus5E0X4MCMhekfwFPDixF8l4/2rlmUTbpohyHgYN1pHEg9+reLsuw9Buh8xZAg/B3cK70OecHO8/ZRAqHpg5ElobP/dD8acD2Tz3Qm26AVf0N8zXy/d2XTNR2OMgFEcbhCCBQhENRiC5R9/s/W3zUkv6VgCCf/yRd+MLQhGFknoVIh2WF3djPY1BBvQ923Ks4Oi8dEDNthaGbGFLtZZtpgBiNg4yY0rPg9JDYgrDK9DsAcLxApu0J7 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0701MB1011: X-MS-Office365-Filtering-Correlation-Id: 0833a44f-f443-4e85-70c3-08d4adee4810 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BLUPR0701MB1011; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1011; 3:qb+/25WHgX+/qSy1OFs06Ofd5aOkBx0ZSPC92xE2nIV0nu6bXfgs7lFDGlpppHYSSELUfUqb7RMwNwcPw6JzUhM/VMftJmOON/34/qxh50J2EMI0sIP6ODtT9ZmSFwYqMRorUqRblOKdh5KHi1+6g9TJQuDTpv1TDXDEpCaymjzX0mDLf6L6g+KPPEColVKBGrUBlnuWAC3Rd8KjAnuv80gvOvYQkkeIHHAFdNriAY/1AqJ5pqUyLiDe9N1X0DMw562TvfJCfNtENFGdJVZGUJcm1UshJjjyzA6PGshcRN2i96UP7cxvi8H8ygoNd+8fbkpW+Nhx2URaSr7gL00og8Uj1mMk0eh7HVs3wbAmVAAp4t8JS+pfgbevKokiuWVELWCMD6SJzhZ8OTZMx5oQMA2/mTD4gntnWbQeVoVDmnaXCruA69nRuH4WaYPIpFs8pgUhw6kSQ0c7L5Lbw78JpigsnZ2umFEvdfUyW9vPjoUr09m5IQb49Ba32yVFoA4t X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1011; 25:wpj4ss/xUrHWz6+dQofqud5Mf335v6Y3YXRJjOOiWe/Z+phf4XZ+vEqJRtyVP5FhuWljy8yPJ+2NfeqGGh6nYQNYxiik1V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jqb2YuPnAsCPnnbhkQVtpgWy85cxBtU1oJqhnk6hJU3m91iwtChg1QHDg4gZSsiuu+zDGPK1q2yGaiO7rP48cD+LrLHuZAiQHTKcxcY88D7A7DpzNGtqoO1W3oFRGi4MC 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)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1011; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1011; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1011; 4:qoRIMOizrwpZ4UaLwGY5+AsUWwQtVlkQWpdnn6Hk?= =?us-ascii?Q?QKGIw6RYj9FESbY5myIWHpB5AUiIw/6VNnKTr3QM7dyEeF0bC1NnLglAjiIX?= =?us-ascii?Q?B1XPRqvVeP3y9TaVxsZwBrUeHV0eFTfp3ikveog/14lXB3OCSMvhFB2J2v3l?= =?us-ascii?Q?dHZqN6RvhUjhOOkFOlxz6NLr7M2MtPA6FeqWDw5zeK9ZMzD+waAcUj6gt61d?= =?us-ascii?Q?g4lhKjiv+l7e2Pm3XMWJaWKPYqkZA47bEnbVzsI/qwniVPnOkZqL89KHPajq?= =?us-ascii?Q?Ch648LZZ7oewfdsPvAcDFl1dWw/QfenPdiwC6t77sU7OqqgJJgmt9p6RVNDW?= =?us-ascii?Q?kmbkDsJQT4Bk9Cy2njCuxd85vE/ZOfOQ2/9wzZnXKHOmtXXRh7fZZ7FqBcQ3?= =?us-ascii?Q?w4rRmt+EaicIxJG+fotKR99b1TigQsDch/mXkaLQazyqIptu3FtWv2v64rrk?= =?us-ascii?Q?QTKDgTbsrA8DrY73+hSIpBhe5B6+fWRQsQDLkBgyPreguvaVSfpG5cR8q/Iu?= =?us-ascii?Q?TlI4AzmibTj9U6X2ZqvwLox/HAN+E10ojTYqfW4SKTymBxumT3+QnOkgerlv?= =?us-ascii?Q?4r+VB2mdMGr7cpAG2NIFNCf8W634xYGV9ZA0QzSAIALZKJs/aIgLUxbOBkO1?= =?us-ascii?Q?q9hyCHSuW7T4l52XSOglIpxzayZY7sHKHLFwrcJpDCCB3GLe3A1H0m1/ghPF?= =?us-ascii?Q?pCthM/wfET4CApaapiRzn7ho7lJEdw+RRtrpVa0D3O0pouUUBDsFVJlKXcPI?= =?us-ascii?Q?7f1g/kBV/KARODUSWuMedS9d8YMPHVX8Ra4gRZmFTC6awj9a2lV5gV3lceaY?= =?us-ascii?Q?HEMrI9+pEj+RlnxafIuVTg8w/s+B+Te7bB4ojSEs/IufWpOjNxDlCW94QKto?= =?us-ascii?Q?lB1WzA7vZMimTXu/P03YRz6+6rWpXFFgCn2v2TFCYwsZEpeemj3Yuv3ldVCl?= =?us-ascii?Q?0X89lTTtefjkv2l1hDhqMioCQexRJkFHTHKrLUt6kveHVoBmBuQG8cRQ2zOR?= =?us-ascii?Q?9tJ6NT3G7X1sz5MZSSFrJ7oalu5o7JgQOBzrER0yCNpugoEfgae+5zPrwAw2?= =?us-ascii?Q?zGXRBWiBUqoySwkHoG5WyrNgZnNPAzbE5h5Ay/sBYVUpOV+iTpioghGxDTfy?= =?us-ascii?Q?h7lmbIBaF2K3RYodwzEkmaXVRqVR0Y1S+wbhk79b18u1CmCot+/u/bOMypBq?= =?us-ascii?Q?EwBBqybjp21VVK0=3D?= X-Forefront-PRVS: 03319F6FEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1011; 23: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hDSNUWz1OKyTsaANhMaJKjMQmI64I5NwUOweVwqA+M4IHMXlIGyO8y/C6EAqe6Vw9g6fkJ2wcLxDspljq1vjj4bZvxKM4rZVggLiQkiEX96onTJvt7xgQBrODdduklJNMje61pKfs+q46WRnQWeN2q+xg/sJKo8FHQPRQYOHA7b/Dj9SHa2+fUwn23dtzZ4lYi608+9Ehj+jz/Kn50/jmIYjpuG3Sgg3B5ImTC1/YclyK87gE0pLNDOoH9Quxyz2WeB0W/DKjjsv4fEQ6rDUfi41bsQPl7By5XhjwDjklZVZoPglFM/L1Rf+R6QIidWDkruBZHkUjs/8mdwKRQiPm; 24:9EXYvo8k5nkIx7l6+IiqF8hkNCE5q5tYCDoAGDewZT3wvl9LTa5mhJhgcA2uj960xEbhAdgA4fgVeJbK+RXoTIQ1lwfSJ6xFc0eFm7oZWAE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1011; 7:Oywckep96bchnlwqOiJaiKDyvUqeW2vOB4h8cvISd+I8+Lpn+b5F4DzApuVZVYep3sFbeE9PeR/MYn2JBalTh4DLlwUVugy/ftJYuRF1XFy2VjEXcPiOpIRv3EpJ/pOlwab7sC/kBWsJuyk9wtf3xi03gkZ8CxYws5ccuWDSjZJGpHLBtHs+bZewRQxQ/a2moBC3it44fKNY7gsMeaFU8HBBaiTEBlaxisyNePbVMJ+A96P95kgjWsO4fFhwWOyiXgialA52mBun5VwvywfIcvwvnkDgQwXwaruVAPDnEBFL4E7ohhX1TwtrX9mRmq7UghJBPBv+rGZYZ4n62u0sVg== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2017 21:43:48.5665 (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: BLUPR0701MB1011 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 assigned to a certain CPU. When new cmd arrives from the wire, the lunid is used to search for qpair. The qpair's assigned 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