linux/drivers/scsi/mpt3sas
Chaitra P B 74522a92bb scsi: mpt3sas: Optimize I/O memory consumption in driver.
For every IO, memory of PAGE size is allocated for handling NVMe native
PRPS. And in addition to that for every IO (chains need per IO * chain
buffer size, e.g. 38 * 128byte) amount of memory is allocated for chain
buffers.

However, at any point of time; the IO request can be for NVMe target
device (where PRP's page is used for framing PRP's) or can be for SCSI
target device (where chain buffers are used for framing chain
SGE's). This patch modifies the driver to reuse same pre-allocated PRP
page buffers as a chain buffer for IO's targeted for SCSI target
devices. No need to allocate separate buffers for chain SGE's buffers.

Suppose if the number of chain buffers need for IO doesn't fit in the
PRP Page size then driver maintain's separate buffers for those extra
chain buffers that exceeds the PRP page size. For example consider PRP
page size as 4K and chain buffer size as 128 bytes, then number of chain
buffers that can fit in PRP page is 4096/128 => 32. if the number of
chain buffer need per IO exceeds 32; for example consider number of
chains need per IO is 36 then for remaining 4 chain buffer's driver
allocates them individual.

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-05-08 00:34:19 -04:00
..
mpi scsi: mpt3sas: Bug fix for big endian systems. 2018-05-08 00:34:19 -04:00
Kconfig mpt3sas: fix Kconfig dependency problem for mpt2sas back compatibility 2015-12-03 09:31:23 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpt3sas_base.c scsi: mpt3sas: Optimize I/O memory consumption in driver. 2018-05-08 00:34:19 -04:00
mpt3sas_base.h scsi: mpt3sas: Lockless access for chain buffers. 2018-05-08 00:34:19 -04:00
mpt3sas_config.c scsi: mpt3sas: Do not use 32-bit atomic request descriptor for Ventura controllers. 2018-02-27 22:26:16 -05:00
mpt3sas_ctl.c scsi: mpt3sas: Bug fix for big endian systems. 2018-05-08 00:34:19 -04:00
mpt3sas_ctl.h scripts/spelling.txt: add "overwritting" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
mpt3sas_debug.h mpt2sas, mpt3sas: Remove SCSI_MPTXSAS_LOGGING entry from Kconfig 2015-11-11 18:31:14 -05:00
mpt3sas_scsih.c scsi: mpt3sas: Bug fix for big endian systems. 2018-05-08 00:34:19 -04:00
mpt3sas_transport.c scsi: mpt3sas: Do not use 32-bit atomic request descriptor for Ventura controllers. 2018-02-27 22:26:16 -05:00
mpt3sas_trigger_diag.c mpt2sas, mpt3sas: Update attribution language to Avago 2015-01-13 16:27:27 +01:00
mpt3sas_trigger_diag.h mpt2sas, mpt3sas: Update attribution language to Avago 2015-01-13 16:27:27 +01:00
mpt3sas_warpdrive.c scsi: mpt3sas: Bug fix for big endian systems. 2018-05-08 00:34:19 -04:00