linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nilesh Javali <njavali@marvell.com>
To: <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <GR-QLogic-Storage-Upstream@marvell.com>
Subject: [PATCH 03/15] qla2xxx: limit interrupt vectors to number of cpu
Date: Tue, 1 Dec 2020 00:27:18 -0800	[thread overview]
Message-ID: <20201201082730.24158-4-njavali@marvell.com> (raw)
In-Reply-To: <20201201082730.24158-1-njavali@marvell.com>

From: Quinn Tran <qutran@marvell.com>

Driver created too many QPairs(126) with 28xx adapter.
Limit the number of CPUs to lower wasted resources.

Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_isr.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index a24b82de4aab..77dd7630c3f8 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -3952,10 +3952,12 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
 	if (USER_CTRL_IRQ(ha) || !ha->mqiobase) {
 		/* user wants to control IRQ setting for target mode */
 		ret = pci_alloc_irq_vectors(ha->pdev, min_vecs,
-		    ha->msix_count, PCI_IRQ_MSIX);
+		    min((u16)ha->msix_count, (u16)num_online_cpus()),
+		    PCI_IRQ_MSIX);
 	} else
 		ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs,
-		    ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY,
+		    min((u16)ha->msix_count, (u16)num_online_cpus()),
+		    PCI_IRQ_MSIX | PCI_IRQ_AFFINITY,
 		    &desc);
 
 	if (ret < 0) {
-- 
2.19.0.rc0


  parent reply	other threads:[~2020-12-01  8:29 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  8:27 [PATCH 00/15] qla2xxx bug fixes Nilesh Javali
2020-12-01  8:27 ` [PATCH 01/15] scsi: qla2xxx: Return EBUSY on fcport deletion Nilesh Javali
2020-12-01 15:40   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 02/15] qla2xxx: Change post del message from debug level to log level Nilesh Javali
2020-12-01 15:45   ` Himanshu Madhani
2020-12-01 16:05     ` Saurav Kashyap
2020-12-01 16:15       ` Himanshu Madhani
2020-12-02  7:44         ` [EXT] " Saurav Kashyap
2020-12-01  8:27 ` Nilesh Javali [this message]
2020-12-01 15:46   ` [PATCH 03/15] qla2xxx: limit interrupt vectors to number of cpu Himanshu Madhani
2020-12-01  8:27 ` [PATCH 04/15] qla2xxx: tear down session if FW say its down Nilesh Javali
2020-12-01 15:48   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 05/15] qla2xxx: Don't check for fw_started while posting nvme command Nilesh Javali
2020-12-01  9:01   ` Daniel Wagner
2020-12-01  9:39     ` Saurav Kashyap
2020-12-01  9:53       ` Daniel Wagner
2020-12-01  9:57         ` [EXT] " Saurav Kashyap
2020-12-01 15:50   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 06/15] qla2xxx: Fix compilation issue in PPC systems Nilesh Javali
2020-12-01 15:52   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 07/15] qla2xxx: Fix crash during driver load on big endian machines Nilesh Javali
2020-12-01 15:54   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 08/15] qla2xxx: Fix FW initialization error " Nilesh Javali
2020-12-01 16:02   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 09/15] qla2xxx: fix N2N and NVME connect retry failure Nilesh Javali
2020-12-01 16:16   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 10/15] qla2xxx: Handle aborts correctly for port undergoing deletion Nilesh Javali
2020-12-01 16:17   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 11/15] qla2xxx: Fix flash update in 28XX adapters on big endian machines Nilesh Javali
2020-12-01 16:17   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 12/15] qla2xxx: Fix the call trace for flush workqueue Nilesh Javali
2020-12-01 16:19   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 13/15] qla2xxx: If fcport is undergoing deletion return IO with retry Nilesh Javali
2020-12-01 16:21   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 14/15] qla2xxx: Fix device loss on 4G and older HBAs Nilesh Javali
2020-12-01 16:22   ` Himanshu Madhani
2020-12-01  8:27 ` [PATCH 15/15] qla2xxx: Update version to 10.02.00.104-k Nilesh Javali
2020-12-01 16:23   ` Himanshu Madhani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201201082730.24158-4-njavali@marvell.com \
    --to=njavali@marvell.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).