summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorShreyas Deodhar <sdeodhar@marvell.com>2022-12-21 20:39:32 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2023-01-11 23:48:26 -0500
commit1d201c81d4cc6840735bbcc99e6031503e5cf3b8 (patch)
tree4a9075fef4c76657b9f7d902ad1042f47e3c18f3 /drivers/scsi/qla2xxx/qla_os.c
parent2f5fab1b6c3a8efc93ba52c28539c45a8d0142ad (diff)
downloadlinux-stable-1d201c81d4cc6840735bbcc99e6031503e5cf3b8.tar.gz
linux-stable-1d201c81d4cc6840735bbcc99e6031503e5cf3b8.tar.bz2
linux-stable-1d201c81d4cc6840735bbcc99e6031503e5cf3b8.zip
scsi: qla2xxx: Select qpair depending on which CPU post_cmd() gets called
In current I/O path, Tx and Rx may not be processed on same CPU. This may lead to thrashing and optimum performance may not be achieved. Pick qpair such that Tx and Rx are processed on same CPU. Signed-off-by: Shreyas Deodhar <sdeodhar@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index d07a914559d3..545167627e48 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -472,6 +472,11 @@ 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;
}
+ if (qla_mapq_alloc_qp_cpu_map(ha) != 0) {
+ kfree(ha->queue_pair_map);
+ ha->queue_pair_map = NULL;
+ goto fail_qpair_map;
+ }
}
/*
@@ -546,6 +551,7 @@ static void qla2x00_free_queues(struct qla_hw_data *ha)
ha->base_qpair = NULL;
}
+ qla_mapq_free_qp_cpu_map(ha);
spin_lock_irqsave(&ha->hardware_lock, flags);
for (cnt = 0; cnt < ha->max_req_queues; cnt++) {
if (!test_bit(cnt, ha->req_qid_map))