megaraid_sas: silence a warning
Subsystems (2)
PATCH v2 1/1 megaraid_sas: silence a warning
Add a flag to dma mem allocation to silence a warning.
This code allocates DMA memory for driver's IO frames which may exceed MAX_ORDER pages for few megaraid_sas controllers(controllers with High Queue Depth). So there is logic to keep on reducing controller Queue Depth until DMA memory required for IO frames fits within MAX_ORDER. So or impacted megaraid_sas controllers,
there would be multiple DMA allocation failure until driver settles down to Controller Queue Depth which has memory requirement within MAX_ORDER. These failed DMA allocation requests causes stack traces in system logs which is not harmful and this patch would silence those warnings/stack traces.
With CMA (Contiguous Memory Allocator) enabled, it's possible to allocate DMA memory exceeding MAX_ORDER.
And that is the reason of keeping this retry logic with less controller Queue Depth instead of calculating controller Queue depth at first hand which has memory requirement less than MAX_ORDER.
---
V2: A change in the description, additional information is added, kindly written by Sumit.
drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/megaraid/megaraid_sas_fusion.c +3 -2
@@ -606,7 +606,8 @@ megasas_alloc_request_fusion(struct megasas_instance *instance) fusion->io_request_frames =dma_pool_alloc (fusion->io_request_frames_pool, -GFP_KERNEL , &fusion->io_request_frames_phys); +GFP_KERNEL | __GFP_NOWARN, + &fusion->io_request_frames_phys);if (!fusion->io_request_frames) {if (instance->max_fw_cmds >= (MEGASAS_REDUCE_QD_COUNT *2 )) { instance->max_fw_cmds -=MEGASAS_REDUCE_QD_COUNT ;
@@ -644,7 +645,7 @@ megasas_alloc_request_fusion(struct megasas_instance *instance) fusion->io_request_frames =dma_pool_alloc (fusion->io_request_frames_pool, -GFP_KERNEL , +GFP_KERNEL | __GFP_NOWARN, &fusion->io_request_frames_phys);if (!fusion->io_request_frames) {
Signature · 1 line
2.21.1
Quoted 43 lines · Tomas Henzl
Add a flag to dma mem allocation to silence a warning.
This code allocates DMA memory for driver's IO frames which may exceed
MAX_ORDERpages for fewmegaraid_sascontrollers(controllers with High Queue Depth). So there is logic to keep on reducing controller Queue Depth until DMA memory required for IO frames fits withinMAX_ORDER. So or impactedmegaraid_sascontrollers,
there would be multiple DMA allocation failure until driver settles down to Controller Queue Depth which has memory requirement withinMAX_ORDER. These failed DMA allocation requests causes stack traces in system logs which is not harmful and this patch would silence those warnings/stack traces.With CMA (Contiguous Memory Allocator) enabled, it's possible to allocate DMA memory exceeding
MAX_ORDER.
And that is the reason of keeping this retry logic with less controller Queue Depth instead of calculating controller Queue depth at first hand which has memory requirement less thanMAX_ORDER.Signed-off-by Tomas Henzl <[email protected]>---
V2: A change in the description, additional information is added, kindly written by Sumit.drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/scsi/megaraid/megaraid_sas_fusion.c +2
-1@@ -606,7 +606,8 @@ megasas_alloc_request_fusion(struct megasas_instance *instance) fusion->io_request_frames =dma_pool_alloc (fusion->io_request_frames_pool, -GFP_KERNEL , &fusion->io_request_frames_phys); +GFP_KERNEL | __GFP_NOWARN, + &fusion->io_request_frames_phys);if (!fusion->io_request_frames) {if (instance->max_fw_cmds >= (MEGASAS_REDUCE_QD_COUNT *2 )) { instance->max_fw_cmds -=MEGASAS_REDUCE_QD_COUNT ;
drivers/scsi/megaraid/megaraid_sas_fusion.c megasas_alloc_request_fusion(struct megasas_instance *instance) · line 651
Quoted 8 lines
drivers/scsi/megaraid/megaraid_sas_fusion.c +1
-1@@ -644,7 +645,7 @@ megasas_alloc_request_fusion(struct megasas_instance *instance) fusion->io_request_frames =dma_pool_alloc (fusion->io_request_frames_pool, -GFP_KERNEL , +GFP_KERNEL | __GFP_NOWARN, &fusion->io_request_frames_phys);if (!fusion->io_request_frames) {
Quoted 14 lines · Tomas Henzl
Add a flag to dma mem allocation to silence a warning.
This code allocates DMA memory for driver's IO frames which may exceed
MAX_ORDERpages for fewmegaraid_sascontrollers(controllers with High Queue Depth). So there is logic to keep on reducing controller Queue Depth until DMA memory required for IO frames fits withinMAX_ORDER. So or impactedmegaraid_sascontrollers,
there would be multiple DMA allocation failure until driver settles down to Controller Queue Depth which has memory requirement withinMAX_ORDER. These failed DMA allocation requests causes stack traces in system logs which is not harmful and this patch would silence those warnings/stack traces.
Quoted 7 lines
With CMA (Contiguous Memory Allocator) enabled, it's possible to allocate DMA memory exceeding
MAX_ORDER.
And that is the reason of keeping this retry logic with less controller Queue Depth instead of calculating controller Queue depth at first hand which has memory requirement less thanMAX_ORDER.Signed-off-by Tomas Henzl <[email protected]>
Quoted 33 lines
---
V2: A change in the description, additional information is added, kindly written by Sumit.drivers/scsi/megaraid/megaraid_sas_fusion.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/scsi/megaraid/megaraid_sas_fusion.c +3
-3@@ -606,7 +606,8 @@ megasas_alloc_request_fusion(struct megasas_instance *instance) fusion->io_request_frames =dma_pool_alloc (fusion->io_request_frames_pool, -GFP_KERNEL , &fusion->io_request_frames_phys); +GFP_KERNEL | __GFP_NOWARN, + &fusion->io_request_frames_phys);if (!fusion->io_request_frames) {if (instance->max_fw_cmds >= (MEGASAS_REDUCE_QD_COUNT *2 )) { instance->max_fw_cmds -=MEGASAS_REDUCE_QD_COUNT ;@@ -644,7 +645,7 @@ megasas_alloc_request_fusion(struct megasas_instance *instance) fusion->io_request_frames =dma_pool_alloc (fusion->io_request_frames_pool, -GFP_KERNEL , +GFP_KERNEL | __GFP_NOWARN, &fusion->io_request_frames_phys);if (!fusion->io_request_frames) { --2.21.1
Martin K. Petersen
AppliedTomas,
Quoted 1 line
Add a flag to dma mem allocation to silence a warning.
Applied to 5.6/scsi-fixes, thank you!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering