From patchwork Mon Jan 28 19:14:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 10784543 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B0CF91E for ; Mon, 28 Jan 2019 19:15:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B9492C045 for ; Mon, 28 Jan 2019 19:15:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 405382C057; Mon, 28 Jan 2019 19:15: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 B1D2C2C045 for ; Mon, 28 Jan 2019 19:15:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727755AbfA1TPF (ORCPT ); Mon, 28 Jan 2019 14:15:05 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:44220 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbfA1TPF (ORCPT ); Mon, 28 Jan 2019 14:15:05 -0500 Received: by mail-pl1-f195.google.com with SMTP id e11so8155365plt.11 for ; Mon, 28 Jan 2019 11:15:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=HBCW47PsRaNCDn0kc66y8gBU+jXtDegCBEUW0nCF9HE=; b=IWpld2VCs+pZdyr4d32MZZ0LvbmB5ERNprs137xoWCkpwNR9dU1tS23tTrfF6sDz3K 6jGxHZ4hpsk+DscF2joblVSBVzvXBIV/VA9kHNbXEINsTfw6x4D8kvgkUfSoA8g11xJE dKDrUqvuQsPOcVe5ryd9gT8Ompaj/oMaiYH6Cv8qjSpR1a+ZIvx94uXvFtphOa3jiaAL VnTO+Wn+det7Rgv+SpMTQU6U8I8k2A7r2r74no2l1IGbFkeicyzRyB8ePLqdRFghMs1w CyGaaSG46tX9R/w0UUYB7EatJQyHM2D/XNk/cYwMeFX6ZsAbsJgr94HfNMqDfgqkTBd5 +tpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HBCW47PsRaNCDn0kc66y8gBU+jXtDegCBEUW0nCF9HE=; b=rN8RQaSTXIk5dsxWwlW27mrX+UdFGFEF3/2i5qcud8bnlHZ4F5A/QHM29cpbtVgISs qSlpHiHak/cvcTDMeQjM70K7HhTm3b/w7UPBcSHG0kntFkFurglaDffyPHZKSV8ehu9K xYDMrIvwN1XduOtLBAeeO1zTcLO9+r7gKUwVdq49r7rZj+znrpatgP9tWqklK0yfy68X NbXTUJBuVM6jtMskt93igbj7P/yGKkDfXg6iPyLUfQRztP3z30khrmQp1lPH9lB+lyHt 3Erocf93n13/7AbAGm1Wj5td5aMHjjaQUGa5uDwQZUG5HUP5Z1jCIxomEs6OVUN3zXzX pD4Q== X-Gm-Message-State: AJcUukeqyfGgSH8w0gDs4gN+SN1BTk7qQTxJtX5TZ3RWoZLabIKrqboQ Kpukp/7UmJVWHtoy4vgvzcUQGDl1 X-Google-Smtp-Source: ALg8bN6nO+JSa4VHZGrGNalYtNzA+gBiH5g/8bUfP5bhuFNbZ0qTnotVa0aP4b9yZS+fNfy4j1D8ng== X-Received: by 2002:a17:902:6909:: with SMTP id j9mr22288674plk.196.1548702904049; Mon, 28 Jan 2019 11:15:04 -0800 (PST) Received: from pallmd1.broadcom.com ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id f13sm4285387pgq.82.2019.01.28.11.15.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Jan 2019 11:15:03 -0800 (PST) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart Subject: [PATCH v4 00/26] lpfc updates for 12.2.0.0 Date: Mon, 28 Jan 2019 11:14:16 -0800 Message-Id: <20190128191442.25665-1-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.7 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 Update lpfc to revision 12.2.0.0 This first 22 patches in this patch set are a rework of the I/O submission path in the driver to focus on cpu affinity. This work raises the performance of the lpfc driver from a level of 1-2M iops per port to numbers that have reached over 5M per port. The modifications have been kept in separate function groupings of 1 per patch. Unfortunately, some of the patches are still a bit daunting. I've kept them as small as possible. The changes can be summarized by the following: - Separate buffer lists, each mapping to an exchange, were maintained in both NVME and SCSI. This has all been commonized. - The old lpfc io_channel was stripped out and replaced by hardware queues. These are wq/cq pairs, 1 per protocol per cpu. If there are less than cpu count, they are equitably distributed among sockets/cores. - MSIX vector allocation is attempted per hardware queue. If fewer vectors than hardware queues, they are equitably distributed among sockets/cores. - XRI allocation is divided up amongst the hardware queues. An early patch will commonize but place things on a single list. A later patch will partition the list among the hardware queues and a subsequent patch will finally implement a sharing scheme between cpus. - Interrupt handling and coalescing is closely looked at. The new irq interfaces are used, several items were corrected, and much better behaviors with the hardware were implemented. - The scsi side is closely looked at to tie into SCSI MQ. NVME is already in place. - As everything is commonized and shared, NVME and SCSI are both enabled by default. - Along the way, other code cleanups and lock avoidance mods were made. The latter 2 patches (not including the copyrights or rev change) are bug fixes for the nvme target module, whose changes are dependent upon the submission path rework. The patches were cut against Martin's 5.1/scsi-queue tree V2: Moved fof_eq snippet from patch 5 to patch 4 per suggestion. Patch 8 (locking on io completion) moved to patch 21. Reworked Locking on completion and abort paths. Modified references to access_ok for kernel api change. Reworked as only scsi_mq is now supported. Removed references to shost_use_scsi_mq() as well as driver addition of an enable_scsi_mq flag and module parameter. Added Copyright updates patch V3: Tweaked patch 17 to do auto-eq-delays only if ganging up on a cpu. V4: patch 11: add comment per review patch 21: unlock before io done() calls per review James Smart (26): lpfc: cleanup: remove nrport from nvme command structure lpfc: cleanup: Remove excess check on NVME io submit code path lpfc: Implement common IO buffers between NVME and SCSI lpfc: Remove extra vector and SLI4 queue for Expresslane lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu lpfc: Partition XRI buffer list across Hardware Queues lpfc: cleanup: Remove unused FCP_XRI_ABORT_EVENT slowpath event lpfc: Adapt cpucheck debugfs logic to Hardware Queues lpfc: Move SCSI and NVME Stats to hardware queue structures lpfc: Convert ring number to hardware queue for nvme wqe posting. lpfc: Synchronize hardware queues with SCSI MQ interface lpfc: Adapt partitioned XRI lists to efficient sharing lpfc: Allow override of hardware queue selection policies lpfc: Fix setting affinity hints to correlate with hardware queues lpfc: Support non-uniform allocation of MSIX vectors to hardware queues lpfc: cleanup: convert eq_delay to usdelay lpfc: Rework EQ/CQ processing to address interrupt coalescing lpfc: Utilize new IRQ API when allocating MSI-X vectors lpfc: Resize cpu maps structures based on possible cpus lpfc: Enable SCSI and NVME fc4s by default lpfc: Rework locking on SCSI io completion lpfc: Fix default driver parameter collision for allowing NPIV support lpfc: Correct upcalling nvmet_fc transport during io done downcall lpfc: Fix nvmet issues when link bounce under IO load lpfc: Update 12.2.0.0 file copyrights to 2019 lpfc: Update lpfc version to 12.2.0.0 drivers/scsi/lpfc/lpfc.h | 97 +- drivers/scsi/lpfc/lpfc_attr.c | 469 ++++--- drivers/scsi/lpfc/lpfc_crtn.h | 36 +- drivers/scsi/lpfc/lpfc_ct.c | 18 +- drivers/scsi/lpfc/lpfc_debugfs.c | 1049 ++++++++++++---- drivers/scsi/lpfc/lpfc_debugfs.h | 73 +- drivers/scsi/lpfc/lpfc_els.c | 6 +- drivers/scsi/lpfc/lpfc_hbadisc.c | 40 +- drivers/scsi/lpfc/lpfc_hw4.h | 16 +- drivers/scsi/lpfc/lpfc_init.c | 2272 +++++++++++++++++++--------------- drivers/scsi/lpfc/lpfc_nportdisc.c | 10 +- drivers/scsi/lpfc/lpfc_nvme.c | 746 +++-------- drivers/scsi/lpfc/lpfc_nvme.h | 66 +- drivers/scsi/lpfc/lpfc_nvmet.c | 448 ++++--- drivers/scsi/lpfc/lpfc_nvmet.h | 4 +- drivers/scsi/lpfc/lpfc_scsi.c | 894 +++++--------- drivers/scsi/lpfc/lpfc_scsi.h | 63 +- drivers/scsi/lpfc/lpfc_sli.c | 2379 +++++++++++++++++++++++------------- drivers/scsi/lpfc/lpfc_sli.h | 89 +- drivers/scsi/lpfc/lpfc_sli4.h | 304 ++++- drivers/scsi/lpfc/lpfc_version.h | 4 +- drivers/scsi/lpfc/lpfc_vport.c | 27 +- 22 files changed, 5179 insertions(+), 3931 deletions(-)