alistair23-linux/drivers/scsi/lpfc
James Smart 77ffd3465b scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ
When SCSI-MQ is enabled, the SCSI-MQ layers will do pre-allocation of MQ
resources based on shost values set by the driver. In newer cases of the
driver, which attempts to set nr_hw_queues to the cpu count, the
multipliers become excessive, with a single shost having SCSI-MQ
pre-allocation reaching into the multiple GBytes range.  NPIV, which
creates additional shosts, only multiply this overhead. On lower-memory
systems, this can exhaust system memory very quickly, resulting in a system
crash or failures in the driver or elsewhere due to low memory conditions.

After testing several scenarios, the situation can be mitigated by limiting
the value set in shost->nr_hw_queues to 4. Although the shost values were
changed, the driver still had per-cpu hardware queues of its own that
allowed parallelization per-cpu.  Testing revealed that even with the
smallish number for nr_hw_queues for SCSI-MQ, performance levels remained
near maximum with the within-driver affiinitization.

A module parameter was created to allow the value set for the nr_hw_queues
to be tunable.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-19 22:14:10 -04:00
..
lpfc.h scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ 2019-08-19 22:14:10 -04:00
lpfc_attr.c scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ 2019-08-19 22:14:10 -04:00
lpfc_attr.h
lpfc_bsg.c
lpfc_bsg.h
lpfc_compat.h
lpfc_crtn.h SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
lpfc_ct.c
lpfc_debugfs.c
lpfc_debugfs.h scsi: lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE 2019-07-11 20:42:30 -04:00
lpfc_disc.h
lpfc_els.c SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
lpfc_hbadisc.c lpfc: add support to generate RSCN events for nport 2019-06-21 11:08:37 +02:00
lpfc_hw.h lpfc: add support to generate RSCN events for nport 2019-06-21 11:08:37 +02:00
lpfc_hw4.h
lpfc_ids.h
lpfc_init.c scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ 2019-08-19 22:14:10 -04:00
lpfc_logmsg.h
lpfc_mbox.c
lpfc_mem.c
lpfc_nl.h
lpfc_nportdisc.c
lpfc_nvme.c SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
lpfc_nvme.h
lpfc_nvmet.c SCSI sg on 20190709 2019-07-11 15:17:41 -07:00
lpfc_nvmet.h
lpfc_scsi.c
lpfc_scsi.h
lpfc_sli.c SCSI misc on 20190709 2019-07-11 15:14:01 -07:00
lpfc_sli.h
lpfc_sli4.h scsi: lpfc: Mitigate high memory pre-allocation by SCSI-MQ 2019-08-19 22:14:10 -04:00
lpfc_version.h scsi: lpfc: Update lpfc version to 12.2.0.3 2019-06-18 19:46:22 -04:00
lpfc_vport.c
lpfc_vport.h
Makefile