From b364d24a571cf2c8bcc3c1ce77bfa0d095464e38 Mon Sep 17 00:00:00 2001 From: DanielBar-On Date: Tue, 28 Feb 2017 16:12:07 +0000 Subject: [PATCH] msg/async/rdma: move active_queue_pairs perf counter dec to polling removing dead qp's is actually done at polling. if polling is busy then dead qp will not be removed and active_queue_pair counter is not correct. issue: 992513 Change-Id: I825e813ce0632fd01f6d29adc87e0e33a2bc13d9 Signed-off-by: DanielBar-On --- src/msg/async/rdma/RDMAConnectedSocketImpl.cc | 1 - src/msg/async/rdma/RDMAStack.cc | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc index a9666b66382..f2e75902022 100644 --- a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc +++ b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc @@ -42,7 +42,6 @@ RDMAConnectedSocketImpl::RDMAConnectedSocketImpl(CephContext *cct, Infiniband* i RDMAConnectedSocketImpl::~RDMAConnectedSocketImpl() { ldout(cct, 20) << __func__ << " destruct." << dendl; - dispatcher->perf_logger->dec(l_msgr_rdma_active_queue_pair); cleanup(); worker->remove_pending_conn(this); dispatcher->erase_qpn(my_msg.qpn); diff --git a/src/msg/async/rdma/RDMAStack.cc b/src/msg/async/rdma/RDMAStack.cc index f5e81dd9d3c..694c1364b5b 100644 --- a/src/msg/async/rdma/RDMAStack.cc +++ b/src/msg/async/rdma/RDMAStack.cc @@ -146,6 +146,7 @@ void RDMADispatcher::polling() while (!dead_queue_pairs.empty()) { ldout(cct, 10) << __func__ << " finally delete qp=" << dead_queue_pairs.back() << dendl; delete dead_queue_pairs.back(); + perf_logger->dec(l_msgr_rdma_active_queue_pair); dead_queue_pairs.pop_back(); } }