From c68ecc743176f0230686fe10ad5f613e0032f91b Mon Sep 17 00:00:00 2001 From: Vu Pham Date: Tue, 20 Jan 2015 13:13:29 -0800 Subject: [PATCH] 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 --- src/msg/xio/XioMessenger.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/msg/xio/XioMessenger.cc b/src/msg/xio/XioMessenger.cc index a88f10c8b9c20..2fc3359ccf2c7 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)); -- 2.39.5