linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDMA/core: reduce IB_POLL_BATCH constant
@ 2018-02-20 20:59 Arnd Bergmann
  2018-02-20 21:14 ` Parav Pandit
  2018-02-20 21:14 ` Bart Van Assche
  0 siblings, 2 replies; 16+ messages in thread
From: Arnd Bergmann @ 2018-02-20 20:59 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Arnd Bergmann, Leon Romanovsky, Sagi Grimberg, Bart Van Assche,
	linux-rdma, linux-kernel

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@arndb.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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-03-01  9:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-20 20:59 [PATCH] RDMA/core: reduce IB_POLL_BATCH constant Arnd Bergmann
2018-02-20 21:14 ` Parav Pandit
2018-02-20 21:54   ` Arnd Bergmann
2018-02-20 21:14 ` Bart Van Assche
2018-02-20 21:47   ` Chuck Lever
2018-02-21  9:47     ` Max Gurtovoy
2018-02-21 13:44     ` Sagi Grimberg
2018-02-21 14:45       ` Max Gurtovoy
2018-02-22 15:39         ` Sagi Grimberg
2018-02-27 22:09           ` Jason Gunthorpe
2018-02-27 22:15             ` Max Gurtovoy
2018-02-28  0:21               ` Bart Van Assche
2018-02-28  9:50                 ` Max Gurtovoy
2018-02-28 18:55                   ` Doug Ledford
2018-03-01  9:36                     ` Max Gurtovoy
2018-02-21 15:10       ` Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).