From: Vu Pham Date: Tue, 20 Jan 2015 21:13:29 +0000 (-0800) Subject: xio: Enable xio option to call fork init X-Git-Tag: v0.93~218^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3425%2Fhead;p=ceph.git xio: Enable xio option to call fork init 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 --- diff --git a/src/msg/xio/XioMessenger.cc b/src/msg/xio/XioMessenger.cc index a88f10c8b9c2..2fc3359ccf2c 100644 --- a/src/msg/xio/XioMessenger.cc +++ b/src/msg/xio/XioMessenger.cc @@ -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));