[RFC PATCH] scsi: megaraid_sas: set msix index for NON_READ_WRITE_LDIO type cmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Before commit 132147d7f620 ("scsi: megaraid_sas: Add support for
High IOPS queues"), all interrupt of megaraid_sas is managed when
smp_affinity_enable for misx_enable. The mapping between vectors and
cpus for a 128 vectors likely:
    vector0 maps to cpu0
    vector1 maps to cpu1
    ...
If cpu0 is offline, vector0 cannot handle any io.

For now, we have not pointed msix index in megasas_build_ld_nonrw_fusion().
The default value of index is '0'. So, cmd like TEST_UNIT_READY will hung
forever after cpu0 offline. We can simplely reproduce by:

    echo 0 > /sys/devices/system/cpu/cpu0/online
    sg_turs /dev/sda # hung

After commit 132147d7f620, low_latency_index_start is set as 1 (not sure
for all scenario), then vector 0 is not managed. Thus, io issue to vector0
can be handled by other cpus after cpu0 offline.

Nevertheless, we may also conside to set msix index rather than default 0
in megasas_build_ld_nonrw_fusion().

Signed-off-by: Yufen Yu <yuyufen@xxxxxxxxxx>
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 38fc9467c625..ddc6176f12c4 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -3021,6 +3021,8 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance,
 		io_request->Function = MPI2_FUNCTION_SCSI_IO_REQUEST;
 		io_request->DevHandle = devHandle;
 	}
+
+	megasas_get_msix_index(instance, scmd, cmd, 1);
 }
 
 /**
-- 
2.25.4




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux