[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180220205924.2035765-1-arnd@arndb.de>
Date: Tue, 20 Feb 2018 21:59:09 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Doug Ledford <dledford@...hat.com>, Jason Gunthorpe <jgg@...pe.ca>
Cc: Arnd Bergmann <arnd@...db.de>,
Leon Romanovsky <leonro@...lanox.com>,
Sagi Grimberg <sagi@...mberg.me>,
Bart Van Assche <bart.vanassche@...disk.com>,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant
The ib_wc structure has grown to much that putting 16 of them on the stack
hits the warning limit for dangerous kernel stack consumption:
drivers/infiniband/core/cq.c: In function 'ib_process_cq_direct':
drivers/infiniband/core/cq.c:78:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
Using half that number brings us comfortably below that limit again.
Fixes: 02d8883f520e ("RDMA/restrack: Add general infrastructure to track RDMA resources")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/infiniband/core/cq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/cq.c b/drivers/infiniband/core/cq.c
index bc79ca8215d7..2626adbb978e 100644
--- a/drivers/infiniband/core/cq.c
+++ b/drivers/infiniband/core/cq.c
@@ -16,7 +16,7 @@
#include <rdma/ib_verbs.h>
/* # of WCs to poll for with a single call to ib_poll_cq */
-#define IB_POLL_BATCH 16
+#define IB_POLL_BATCH 8
/* # of WCs to iterate over before yielding */
#define IB_POLL_BUDGET_IRQ 256
--
2.9.0
Powered by blists - more mailing lists