[PATCH 03/12] lpfc 8.3.34: Fix number of IO channels to match CPUs

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

 



Fix number of IO channels to match CPUs


Signed-off-by: James Smart <james.smart@xxxxxxxxxx>

 ---

 lpfc_init.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)


diff -upNr a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
--- a/drivers/scsi/lpfc/lpfc_init.c	2012-08-11 12:24:51.636924276 -0400
+++ b/drivers/scsi/lpfc/lpfc_init.c	2012-08-11 12:24:51.775924271 -0400
@@ -6542,6 +6542,9 @@ static int
 lpfc_sli4_queue_verify(struct lpfc_hba *phba)
 {
 	int cfg_fcp_io_channel;
+	uint32_t cpu;
+	uint32_t i = 0;
+
 
 	/*
 	 * Sanity check for configured queue parameters against the run-time
@@ -6551,6 +6554,17 @@ lpfc_sli4_queue_verify(struct lpfc_hba *
 	/* Sanity check on HBA EQ parameters */
 	cfg_fcp_io_channel = phba->cfg_fcp_io_channel;
 
+	/* It doesn't make sense to have more io channels then CPUs */
+	for_each_online_cpu(cpu) {
+		i++;
+	}
+	if (i < cfg_fcp_io_channel) {
+		lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
+				"3188 Reducing IO channels to match number of "
+				"CPUs: from %d to %d\n", cfg_fcp_io_channel, i);
+		cfg_fcp_io_channel = i;
+	}
+
 	if (cfg_fcp_io_channel >
 	    phba->sli4_hba.max_cfg_param.max_eq) {
 		cfg_fcp_io_channel = phba->sli4_hba.max_cfg_param.max_eq;



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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