From: Sage Weil Date: Wed, 19 May 2021 19:23:26 +0000 (-0400) Subject: msg/async: configurable threshold for reaping dead connections X-Git-Tag: v17.1.0~1666^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8129d6bb953015cc05db458afa6aa9b8f5f62614;p=ceph.git msg/async: configurable threshold for reaping dead connections It is helpful to set this to 1 for tests. Signed-off-by: Sage Weil --- diff --git a/src/common/options/global.yaml.in b/src/common/options/global.yaml.in index cc11522e0452..d60c8872089e 100644 --- a/src/common/options/global.yaml.in +++ b/src/common/options/global.yaml.in @@ -1352,6 +1352,13 @@ options: min: 1 max: 24 with_legacy: true +- name: ms_async_reap_threshold + type: uint + level: dev + desc: number of deleted connections before we reap + default: 5 + min: 1 + with_legacy: true - name: ms_async_rdma_device_name type: str level: advanced diff --git a/src/msg/async/AsyncMessenger.h b/src/msg/async/AsyncMessenger.h index 00bed684cd34..17b1f57f527f 100644 --- a/src/msg/async/AsyncMessenger.h +++ b/src/msg/async/AsyncMessenger.h @@ -209,8 +209,6 @@ private: entity_addrvec_t _filter_addrs(const entity_addrvec_t& addrs); private: - static const uint64_t ReapDeadConnectionThreshold = 5; - NetworkStack *stack; std::vector processors; friend class Processor; @@ -403,7 +401,7 @@ public: deleted_conns.emplace(std::move(conn)); conn->unregister(); - if (deleted_conns.size() >= ReapDeadConnectionThreshold) { + if (deleted_conns.size() >= cct->_conf->ms_async_reap_threshold) { local_worker->center.dispatch_event_external(reap_handler); } }