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 <edwin.rodriguez1@ibm.com>
This commit is contained in:
Edwin Rodriguez 2026-05-21 09:21:32 -04:00
parent 51f9de8d34
commit d96e5b148f

View 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) {