Whamcloud - gitweb
LU-9810 lnd: use less CQ entries for each connection 74/33974/2
authorAlexey Lyashkov <alexey.lyashkov@seagate.com>
Mon, 27 Nov 2017 12:44:56 +0000 (15:44 +0300)
committerOleg Drokin <green@whamcloud.com>
Sat, 19 Jan 2019 06:29:07 +0000 (06:29 +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
Lustre-change: https://review.whamcloud.com/28279
Lustre-commit: 052f76bf708414b3a127aa9602b4a69415c1cb2f

Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Change-Id: I0c06fef9589478f40ef7e1eeacff2aec7013e562
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33974
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/o2iblnd/o2iblnd.h

index d8ad142..cc3683a 100644 (file)
@@ -164,7 +164,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;