diff options
author | Patrick Donnelly <pdonnell@ibm.com> | 2024-10-24 05:16:03 +0200 |
---|---|---|
committer | Patrick Donnelly <pdonnell@ibm.com> | 2024-10-25 16:24:05 +0200 |
commit | 7de5af59c2741b4203cc17f619ca53096c97b8ff (patch) | |
tree | e4d18c856b102d0705be9afb16fb9d773e871e41 /src/mds | |
parent | log: concatenate thread names and print once per thread (diff) | |
download | ceph-7de5af59c2741b4203cc17f619ca53096c97b8ff.tar.xz ceph-7de5af59c2741b4203cc17f619ca53096c97b8ff.zip |
common: cache pthread names
This provides common ceph entrypoints for the pthread_[gs]name functions which
will also cache a thread_local copy. This also removes the pthread_t parameter
which precipitated the bug i50743.
Obviously, the overall goal here is to avoid system calls.
See-also: https://tracker.ceph.com/issues/50743
Fixes: 0be8d01c9ddde0d7d24edd34dc75f6cfc861b5ba
Fixes: https://tracker.ceph.com/issues/68691
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Diffstat (limited to 'src/mds')
-rw-r--r-- | src/mds/Beacon.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mds/Beacon.cc b/src/mds/Beacon.cc index 642d3428a27..d79e6f3b8cb 100644 --- a/src/mds/Beacon.cc +++ b/src/mds/Beacon.cc @@ -74,7 +74,7 @@ void Beacon::init(const MDSMap &mdsmap) _notify_mdsmap(mdsmap); sender = std::thread([this]() { - ceph_pthread_setname(pthread_self(), "beacon"); + ceph_pthread_setname("beacon"); std::unique_lock<std::mutex> lock(mutex); bool sent; while (!finished) { |