From: Edwin Rodriguez Date: Thu, 21 May 2026 13:21:32 +0000 (-0400) Subject: cephfs-tool: set thread names for read/write workers X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d96e5b148f790c4755cf5f2cf65f9912f01075b6;p=ceph.git cephfs-tool: set thread names for read/write workers 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 --- diff --git a/src/tools/cephfs/cephfs-tool.cc b/src/tools/cephfs/cephfs-tool.cc index 576b6481c025..3991deff010a 100644 --- a/src/tools/cephfs/cephfs-tool.cc +++ b/src/tools/cephfs/cephfs-tool.cc @@ -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) {