]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: use monotonic time for DecayCounter
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 8 Jun 2018 03:40:33 +0000 (20:40 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 15 Jun 2018 14:04:42 +0000 (07:04 -0700)
commitbc7cb5798593a29a636cb53412b73856d4e3a093
tree3171f0a3badab29e90106e31d3fef40f17e0bfa2
parent9a3f8a14bbb1f6c4be06badff498cfd9f2cf0495
mds: use monotonic time for DecayCounter

This commit has a few side-effects:
- Decaying the DecayCounter is more accurate, we do not need to "skip" decaying
  the counter if it's been less than a second since the last decay. The time
  delta is now at the granularity of the monotonic clock.
- Any check of the DecayCounter results in updating the current value, even
  const checks.
- DecayRate is now established when the DecayCounter is created. There's no longer
  a need to pass the DecayRate whenever interacting with the counter.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
21 files changed:
src/common/DecayCounter.cc
src/common/DecayCounter.h
src/common/ceph_time.h
src/common/legacy_config_opts.h
src/mds/CDir.cc
src/mds/CDir.h
src/mds/CInode.cc
src/mds/CInode.h
src/mds/Locker.cc
src/mds/MDBalancer.cc
src/mds/MDBalancer.h
src/mds/MDCache.cc
src/mds/MDSRank.cc
src/mds/MDSRank.h
src/mds/Migrator.cc
src/mds/Migrator.h
src/mds/Server.cc
src/mds/mdstypes.cc
src/mds/mdstypes.h
src/messages/MHeartbeat.h
src/test/old/testcounter.cc