diff options
author | Patrick Donnelly <pdonnell@ibm.com> | 2024-11-13 04:17:59 +0100 |
---|---|---|
committer | Patrick Donnelly <pdonnell@ibm.com> | 2024-11-13 04:17:59 +0100 |
commit | 584a81c6864726c3d079f4709a408410ccb46ab4 (patch) | |
tree | 798616473e4b9fd2c950f51d222eb3ac7995c0a2 /src/mds | |
parent | Merge PR #60327 into main (diff) | |
parent | mds: add or update MDS thread names (diff) | |
download | ceph-584a81c6864726c3d079f4709a408410ccb46ab4.tar.xz ceph-584a81c6864726c3d079f4709a408410ccb46ab4.zip |
Merge PR #60464 into main
* refs/pull/60464/head:
mds: add or update MDS thread names
log: cache recent threads up to a day
common: cache pthread names
log: concatenate thread names and print once per thread
Reviewed-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'src/mds')
-rw-r--r-- | src/mds/Beacon.cc | 2 | ||||
-rw-r--r-- | src/mds/MDCache.cc | 1 | ||||
-rw-r--r-- | src/mds/MDLog.cc | 12 | ||||
-rw-r--r-- | src/mds/MDSRank.cc | 4 | ||||
-rw-r--r-- | src/mds/MetricAggregator.cc | 1 | ||||
-rw-r--r-- | src/mds/MetricsHandler.cc | 1 | ||||
-rw-r--r-- | src/mds/PurgeQueue.cc | 2 | ||||
-rw-r--r-- | src/mds/QuiesceAgent.h | 2 | ||||
-rw-r--r-- | src/mds/QuiesceDbManager.cc | 2 |
9 files changed, 16 insertions, 11 deletions
diff --git a/src/mds/Beacon.cc b/src/mds/Beacon.cc index 76dd60ea61d..6fbfc79d416 100644 --- a/src/mds/Beacon.cc +++ b/src/mds/Beacon.cc @@ -75,7 +75,7 @@ void Beacon::init(const MDSMap &mdsmap) _notify_mdsmap(mdsmap); sender = std::thread([this]() { - ceph_pthread_setname(pthread_self(), "beacon"); + ceph_pthread_setname("mds-beacon"); std::unique_lock<std::mutex> lock(mutex); bool sent; while (!finished) { diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index d822f196960..3af0d8c6b1e 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -14378,6 +14378,7 @@ bool MDCache::is_ready_to_trim_cache(void) void MDCache::upkeep_main(void) { + ceph_pthread_setname("mds-cache-trim"); std::unique_lock lock(upkeep_mutex); // create a "memory model" for the upkeep thread. The object maintains diff --git a/src/mds/MDLog.cc b/src/mds/MDLog.cc index 177bd32cbb9..4bbf2a1a141 100644 --- a/src/mds/MDLog.cc +++ b/src/mds/MDLog.cc @@ -259,7 +259,7 @@ void MDLog::create(MDSContext *c) logger->set(l_mdl_expos, journaler->get_expire_pos()); logger->set(l_mdl_wrpos, journaler->get_write_pos()); - submit_thread.create("md_submit"); + submit_thread.create("mds-log-submit"); } void MDLog::open(MDSContext *c) @@ -268,9 +268,9 @@ void MDLog::open(MDSContext *c) ceph_assert(!recovery_thread.is_started()); recovery_thread.set_completion(c); - recovery_thread.create("md_recov_open"); + recovery_thread.create("mds-log-recvr"); - submit_thread.create("md_submit"); + submit_thread.create("mds-log-submit"); // either append() or replay() will follow. } @@ -312,7 +312,7 @@ void MDLog::reopen(MDSContext *c) recovery_thread.join(); recovery_thread.set_completion(new C_ReopenComplete(this, c)); - recovery_thread.create("md_recov_reopen"); + recovery_thread.create("mds-log-reopen"); } void MDLog::append() @@ -663,6 +663,8 @@ bool MDLog::is_trim_slow() const { } void MDLog::log_trim_upkeep(void) { + ceph_pthread_setname("mds-log-trim"); + dout(10) << dendl; std::unique_lock mds_lock(mds->mds_lock); @@ -1014,7 +1016,7 @@ void MDLog::replay(MDSContext *c) } already_replayed = true; - replay_thread.create("md_log_replay"); + replay_thread.create("mds-log-replay"); } diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 30820493cda..52ed930d71b 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -496,7 +496,7 @@ MDSRank::MDSRank( objecter->unset_honor_pool_full(); - finisher = new Finisher(cct, "MDSRank", "MR_Finisher"); + finisher = new Finisher(cct, "MDSRank", "mds-rank-fin"); mdcache = new MDCache(this, purge_queue); mdlog = new MDLog(this); @@ -581,7 +581,7 @@ void MDSRankDispatcher::init() // who is interested in it. handle_osd_map(); - progress_thread.create("mds_rank_progr"); + progress_thread.create("mds-rank-progr"); purge_queue.init(); diff --git a/src/mds/MetricAggregator.cc b/src/mds/MetricAggregator.cc index 1d17bbf3e92..6cbd9a094c0 100644 --- a/src/mds/MetricAggregator.cc +++ b/src/mds/MetricAggregator.cc @@ -73,6 +73,7 @@ int MetricAggregator::init() { m_cct->get_perfcounters_collection()->add(m_perf_counters); pinger = std::thread([this]() { + ceph_pthread_setname("mds-ping"); std::unique_lock locker(lock); while (!stopping) { ping_all_active_ranks(); diff --git a/src/mds/MetricsHandler.cc b/src/mds/MetricsHandler.cc index 9ad10b9d6e6..9fc4c6122a4 100644 --- a/src/mds/MetricsHandler.cc +++ b/src/mds/MetricsHandler.cc @@ -51,6 +51,7 @@ void MetricsHandler::init() { dout(10) << dendl; updater = std::thread([this]() { + ceph_pthread_setname("mds-metrics"); std::unique_lock locker(lock); while (!stopping) { double after = g_conf().get_val<std::chrono::seconds>("mds_metrics_update_interval").count(); diff --git a/src/mds/PurgeQueue.cc b/src/mds/PurgeQueue.cc index 925bff16542..4426d3ca6fe 100644 --- a/src/mds/PurgeQueue.cc +++ b/src/mds/PurgeQueue.cc @@ -122,7 +122,7 @@ PurgeQueue::PurgeQueue( cct(cct_), rank(rank_), metadata_pool(metadata_pool_), - finisher(cct, "PurgeQueue", "PQ_Finisher"), + finisher(cct, "PurgeQueue", "mds-pq-fin"), timer(cct, lock), filer(objecter_, &finisher), objecter(objecter_), diff --git a/src/mds/QuiesceAgent.h b/src/mds/QuiesceAgent.h index 5c07d6d8074..85900e8e71b 100644 --- a/src/mds/QuiesceAgent.h +++ b/src/mds/QuiesceAgent.h @@ -30,7 +30,7 @@ class QuiesceAgent { : quiesce_control(quiesce_control) , stop_agent_thread(false) , agent_thread(this) { - agent_thread.create("quiesce.agt"); + agent_thread.create("mds-q-agt"); }; virtual ~QuiesceAgent() { diff --git a/src/mds/QuiesceDbManager.cc b/src/mds/QuiesceDbManager.cc index 12c83634e54..bb3ae93e378 100644 --- a/src/mds/QuiesceDbManager.cc +++ b/src/mds/QuiesceDbManager.cc @@ -200,7 +200,7 @@ void QuiesceDbManager::update_membership(const QuiesceClusterMembership& new_mem // start the thread dout(5) << "starting the db mgr thread at epoch: " << new_membership.epoch << dendl; db_thread_should_exit = false; - quiesce_db_thread.create("quiesce_db_mgr"); + quiesce_db_thread.create("mds-q-db"); } else if (quiesce_db_thread.is_started()) { submit_condition.notify_all(); } |