Whamcloud - gitweb
LU-9810 lnd: use less CQ entries for each connection 79/28279/10
authorAlexey Lyashkov <alexey.lyashkov@seagate.com>
Mon, 27 Nov 2017 12:44:56 +0000 (15:44 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Dec 2017 06:48:34 +0000 (06:48 +0000)
Currently we have a 2 work requests chains per transfer.
It mean OFED stack will generate only 2 events if transfer will
faild. Reduce number CQ entries to avoid extra resource consumption.

Test-Parameters: trivial
Seagate-bug-id: MRP-4508
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Change-Id: I0c06fef9589478f40ef7e1eeacff2aec7013e562
Reviewed-on: https://review.whamcloud.com/28279
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/o2iblnd/o2iblnd.h

index 0c6bddf..6b265c2 100644 (file)
@@ -167,7 +167,11 @@ extern kib_tunables_t  kiblnd_tunables;
 #define IBLND_SEND_WRS(c)      \
        ((c->ibc_max_frags + 1) * kiblnd_concurrent_sends(c->ibc_version, \
                                                          c->ibc_peer->ibp_ni))
-#define IBLND_CQ_ENTRIES(c)         (IBLND_RECV_WRS(c) + IBLND_SEND_WRS(c))
+
+/* 2 = LNet msg + Transfer chain */
+#define IBLND_CQ_ENTRIES(c)    \
+       (IBLND_RECV_WRS(c) + 2 * kiblnd_concurrent_sends(c->ibc_version, \
+                                                        c->ibc_peer->ibp_ni))
 
 struct kib_hca_dev;