diff options
author | Shivasharan S <shivasharan.srikanteshwara@broadcom.com> | 2017-10-19 02:48:53 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-10-25 04:55:25 -0400 |
commit | 2dd689c808b932379b01228de5b370fc68eb0186 (patch) | |
tree | 8a0eb041fdece303c06d2e481a22fdcdeae58fb7 /drivers/scsi/megaraid/megaraid_sas_fusion.h | |
parent | f369a31578c461a360f58c7695e5aef931bada13 (diff) |
scsi: megaraid_sas: reduce size of fusion_context and use kmalloc for allocation
fusion_context structure is very large around 180kB and most of the size
is contributed by log_to_span array. Move log_to_span out of fusion
context and have separate allocation for log_to_span. And use kmalloc to
allocate fusion_context. Currently kmemleak reports 1000s of false
positives for fusion->cmd_list[]. kmemleak does not track page
allocation for fusion_context. This change will also fix the false
positives reported by kmemleak.
Ref: https://marc.info/?l=linux-scsi&m=150545293900917
Reported-by: Shu Wang <shuwang@redhat.com>
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_fusion.h')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_fusion.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.h b/drivers/scsi/megaraid/megaraid_sas_fusion.h index 7c1f7ccf031d..a2b56913f382 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.h +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h @@ -1312,7 +1312,8 @@ struct fusion_context { u8 fast_path_io; struct LD_LOAD_BALANCE_INFO *load_balance_info; u32 load_balance_info_pages; - LD_SPAN_INFO log_to_span[MAX_LOGICAL_DRIVES_EXT]; + LD_SPAN_INFO *log_to_span; + u32 log_to_span_pages; struct LD_STREAM_DETECT **stream_detect_by_ld; }; |