diff options
author | Roman Penyaev <rpenyaev@suse.de> | 2019-08-30 08:59:02 +0200 |
---|---|---|
committer | Changcheng Liu <changcheng.liu@aliyun.com> | 2019-09-16 09:25:01 +0200 |
commit | 2fb8be43fa2a758cc7934f7a82a48ad2d47d1112 (patch) | |
tree | b9c53a078a37b0821f7c3fcb5ef94c398855dffa /src/msg/async/rdma | |
parent | msg/async/rdma: use special Beacon to detect SQ WRs drained (diff) | |
download | ceph-2fb8be43fa2a758cc7934f7a82a48ad2d47d1112.tar.xz ceph-2fb8be43fa2a758cc7934f7a82a48ad2d47d1112.zip |
msg/async/rdma: no need to audit inflight SQ WQEs
Beacon is used to detect SQ WQEs drained. There's no need to
to use tx_wr_inflight to check whether SQ WQEs has been drained
before destroying the QueuePair.
Signed-off-by: Roman Penyaev <rpenyaev@suse.de>
Diffstat (limited to 'src/msg/async/rdma')
-rw-r--r-- | src/msg/async/rdma/Infiniband.h | 4 | ||||
-rw-r--r-- | src/msg/async/rdma/RDMAConnectedSocketImpl.cc | 2 | ||||
-rw-r--r-- | src/msg/async/rdma/RDMAStack.cc | 4 |
3 files changed, 0 insertions, 10 deletions
diff --git a/src/msg/async/rdma/Infiniband.h b/src/msg/async/rdma/Infiniband.h index 2c21077d2e7..89bf2e1a697 100644 --- a/src/msg/async/rdma/Infiniband.h +++ b/src/msg/async/rdma/Infiniband.h @@ -485,9 +485,6 @@ class Infiniband { int recv_cm_meta(CephContext *cct, int socket_fd); void wire_gid_to_gid(const char *wgid, ib_cm_meta_t* cm_meta_data); void gid_to_wire_gid(const ib_cm_meta_t& cm_meta_data, char wgid[]); - void add_tx_wr(uint32_t amt) { tx_wr_inflight += amt; } - void dec_tx_wr(uint32_t amt) { tx_wr_inflight -= amt; } - uint32_t get_tx_wr() const { return tx_wr_inflight; } ibv_qp* get_qp() const { return qp; } Infiniband::CompletionQueue* get_tx_cq() const { return txcq; } Infiniband::CompletionQueue* get_rx_cq() const { return rxcq; } @@ -515,7 +512,6 @@ class Infiniband { uint32_t max_recv_wr; uint32_t q_key; bool dead; - std::atomic<uint32_t> tx_wr_inflight = {0}; // counter for inflight Tx WQEs }; public: diff --git a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc index 0112f8f3a88..9f0cd70b317 100644 --- a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc +++ b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc @@ -494,7 +494,6 @@ int RDMAConnectedSocketImpl::post_work_request(std::vector<Chunk*> &tx_buffers) worker->perf_logger->inc(l_msgr_rdma_tx_failed); return -errno; } - qp->add_tx_wr(num); worker->perf_logger->inc(l_msgr_rdma_tx_chunks, tx_buffers.size()); ldout(cct, 20) << __func__ << " qp state is " << get_qp_state() << dendl; return 0; @@ -516,7 +515,6 @@ void RDMAConnectedSocketImpl::fin() { worker->perf_logger->inc(l_msgr_rdma_tx_failed); return ; } - qp->add_tx_wr(1); } void RDMAConnectedSocketImpl::cleanup() { diff --git a/src/msg/async/rdma/RDMAStack.cc b/src/msg/async/rdma/RDMAStack.cc index 581eabf7e96..6c98d7be92f 100644 --- a/src/msg/async/rdma/RDMAStack.cc +++ b/src/msg/async/rdma/RDMAStack.cc @@ -454,10 +454,6 @@ void RDMADispatcher::handle_tx_event(ibv_wc *cqe, int n) << " len: " << response->byte_len << " , addr:" << chunk << " " << ib->wc_status_to_string(response->status) << dendl; - QueuePair *qp = get_qp(response->qp_num); - if (qp) - qp->dec_tx_wr(1); - if (response->status != IBV_WC_SUCCESS) { perf_logger->inc(l_msgr_rdma_tx_total_wc_errors); if (response->status == IBV_WC_RETRY_EXC_ERR) { |