]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-tool: set thread names for read/write workers
authorEdwin Rodriguez <edwin.rodriguez1@ibm.com>
Thu, 21 May 2026 13:21:32 +0000 (09:21 -0400)
committerEdwin Rodriguez <edwin.rodriguez1@ibm.com>
Wed, 1 Jul 2026 13:11:15 +0000 (09:11 -0400)
Set pthread names on all benchmark worker threads (wr-worker-N, rd-worker-N)
via ceph_pthread_setname so they are visible in top, perf, and lockstat
output during profiling.

Fixes: https://tracker.ceph.com/issues/76183
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
src/tools/cephfs/cephfs-tool.cc

index 576b6481c0253cd6e7a5620b2f81109f842d2cad..3991deff010a0d803dd229e3f8f23ef2d424e466 100644 (file)
@@ -426,6 +426,7 @@ bench_write_worker(
   ceph_pthread_setname(("wr-worker-" + std::to_string(thread_id)).c_str());
   auto duration_limit = std::chrono::seconds(config.duration);
 
+  ceph_pthread_setname(("wr-worker-" + std::to_string(thread_id)).c_str());
   if (config.per_thread_mount) {
     if (int rc = setup_mount(&cmount, config, ss); rc < 0) {
       ss << "Thread " << thread_id << " mount failed: " << strerror(-rc) << std::endl;
@@ -762,6 +763,7 @@ bench_read_worker(
   struct ceph_mount_info *cmount = shared_cmount;
   ceph_pthread_setname(("rd-worker-" + std::to_string(thread_id)).c_str());
   auto duration_limit = std::chrono::seconds(config.duration);
+  ceph_pthread_setname(("rd-worker-" + std::to_string(thread_id)).c_str());
 
   if (config.per_thread_mount) {
     if (int rc = setup_mount(&cmount, config, ss); rc < 0) {