All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomas Henzl <thenzl@redhat.com>
To: linux-scsi@vger.kernel.org
Cc: sumit.saxena@broadcom.com,
	shivasharan.srikanteshwara@broadcom.com, lduncan@suse.com
Subject: [PATCH V2] megaraid_sas: silence a warning
Date: Tue,  4 Feb 2020 16:24:13 +0100	[thread overview]
Message-ID: <20200204152413.7107-1-thenzl@redhat.com> (raw)

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.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
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(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 0f5399b3e..1fa2d1449 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -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


             reply	other threads:[~2020-02-04 15:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 15:24 Tomas Henzl [this message]
2020-02-04 17:41 ` [PATCH V2] megaraid_sas: silence a warning Lee Duncan
2020-02-05  7:37 ` Sumit Saxena
2020-02-13  0:15 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200204152413.7107-1-thenzl@redhat.com \
    --to=thenzl@redhat.com \
    --cc=lduncan@suse.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=sumit.saxena@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.