]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
xio: Enable xio option to call fork init 3425/head
authorVu Pham <vu@mellanox.com>
Tue, 20 Jan 2015 21:13:29 +0000 (13:13 -0800)
committerVu Pham <vu@mellanox.com>
Tue, 20 Jan 2015 23:24:49 +0000 (15:24 -0800)
Ceph fork when running as daemon. This fix call xio option to enforce
Accelio to explicitly call ibv_fork_init() to avoid cq overrun issue.

Signed-off-by: Vu Pham <vu@mellanox.com>
src/msg/xio/XioMessenger.cc

index a88f10c8b9c2038521a92a396344990d24ef7e22..2fc3359ccf2c74b208e31758eea7ff95990402b3 100644 (file)
@@ -22,6 +22,7 @@
 #include "XioMsg.h"
 #include "XioMessenger.h"
 #include "common/address_helper.h"
+#include "common/code_environment.h"
 #include "messages/MNop.h"
 
 #define dout_subsys ceph_subsys_xio
@@ -284,6 +285,12 @@ XioMessenger::XioMessenger(CephContext *cct, entity_name_t name,
       xio_set_opt(NULL, XIO_OPTLEVEL_ACCELIO, XIO_OPTNAME_DISABLE_HUGETBL,
                  &xopt, sizeof(xopt));
 
+      if (g_code_env == CODE_ENVIRONMENT_DAEMON) {
+        xopt = 1;
+        xio_set_opt(NULL, XIO_OPTLEVEL_RDMA, XIO_OPTNAME_ENABLE_FORK_INIT,
+                   &xopt, sizeof(xopt));
+      }
+
       xopt = XIO_MSGR_IOVLEN;
       xio_set_opt(NULL, XIO_OPTLEVEL_ACCELIO, XIO_OPTNAME_MAX_IN_IOVLEN,
                  &xopt, sizeof(xopt));