scsi: lpfc: Reduce memory footprint for lpfc_queue
authorJames Smart <jsmart2021@gmail.com>
Tue, 12 Mar 2019 23:30:28 +0000 (16:30 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Mar 2019 17:15:09 +0000 (13:15 -0400)
commit9afbee3d62a40532441d0de36ef3eaa38661a7bf
treed4642e2ab57bcfc5702fcf862b4db997bd1231dd
parent9a66d990c7429d61c1cdc6feb22e559da587a0db
scsi: lpfc: Reduce memory footprint for lpfc_queue

Currently the driver maintains a sideband structure which has a pointer for
each queue element. However, at 8 bytes per pointer, and up to 4k elements
per queue, and 100s of queues, this can take up a lot of memory.

Convert the driver to using an access routine that calculates the element
address based on its index rather than using the pointer table.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_debugfs.h
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_sli4.h