diff options
author | Quinn Tran <quinn.tran@cavium.com> | 2017-06-14 05:47:20 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-28 03:21:40 +0200 |
commit | 09620eeb62c4167d0c206f9a69730fa9e9251aae (patch) | |
tree | 7c03e5194e923553bebefd958d645e7c2eb8963f /drivers/scsi/qla2xxx/qla_isr.c | |
parent | scsi: qla2xxx: Fix mailbox failure while deleting Queue pairs (diff) | |
download | linux-09620eeb62c4167d0c206f9a69730fa9e9251aae.tar.xz linux-09620eeb62c4167d0c206f9a69730fa9e9251aae.zip |
scsi: qla2xxx: Add debug knob for user control workload
For Target mode, user can control the work load by placing qla2xxx's irq
vector on certain CPU via the smp_affinity knob. 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.
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 <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 11 |
1 files changed, 8 insertions, 3 deletions
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, |