bool throttled = false;
while (1) {
throttled |= trim_counter_start+trimmed >= trim_threshold;
- if (throttled) break;
+ if (throttled) {
+ if (logger) {
+ logger->inc(l_mdss_cache_trim_throttle);
+ }
+ break;
+ }
CDentry *dn = static_cast<CDentry*>(bottom_lru.lru_expire());
if (!dn)
break;
// trim dentries from the LRU until count is reached
while (!throttled && (cache_toofull() || count > 0)) {
throttled |= trim_counter_start+trimmed >= trim_threshold;
- if (throttled) break;
+ if (throttled) {
+ if (logger) {
+ logger->inc(l_mdss_cache_trim_throttle);
+ }
+ break;
+ }
CDentry *dn = static_cast<CDentry*>(lru.lru_expire());
if (!dn) {
break;
PerfCountersBuilder::PRIO_INTERESTING);
plb.add_u64_counter(l_mdss_cap_revoke_eviction, "cap_revoke_eviction",
"Cap Revoke Client Eviction", "cre", PerfCountersBuilder::PRIO_INTERESTING);
+ plb.add_u64_counter(l_mdss_cache_trim_throttle, "cache_trim_throttle",
+ "Cache trim throttle counter", "ctt", PerfCountersBuilder::PRIO_INTERESTING);
+ plb.add_u64_counter(l_mdss_session_recall_throttle, "session_recall_throttle",
+ "Session recall throttle counter", "srt", PerfCountersBuilder::PRIO_INTERESTING);
+ plb.add_u64_counter(l_mdss_session_recall_throttle2o, "session_recall_throttle2o",
+ "Session recall throttle2o counter", "srt2", PerfCountersBuilder::PRIO_INTERESTING);
+ plb.add_u64_counter(l_mdss_global_recall_throttle, "global_recall_throttle",
+ "Global recall throttle counter", "grt", PerfCountersBuilder::PRIO_INTERESTING);
plb.add_u64_counter(l_mdss_cap_acquisition_throttle,
"cap_acquisition_throttle", "Cap acquisition throttle counter", "cat",
PerfCountersBuilder::PRIO_INTERESTING);
const uint64_t global_recall_throttle = recall_throttle.get();
if (session_recall_throttle+recall > recall_max_decay_threshold) {
dout(15) << " session recall threshold (" << recall_max_decay_threshold << ") hit at " << session_recall_throttle << "; skipping!" << dendl;
+ if (logger) {
+ logger->inc(l_mdss_session_recall_throttle);
+ }
throttled = true;
continue;
} else if (session_recall_throttle2o+recall > recall_max_caps*2) {
dout(15) << " session recall 2nd-order threshold (" << 2*recall_max_caps << ") hit at " << session_recall_throttle2o << "; skipping!" << dendl;
+ if (logger) {
+ logger->inc(l_mdss_session_recall_throttle2o);
+ }
throttled = true;
continue;
} else if (global_recall_throttle+recall > recall_global_max_decay_threshold) {
dout(15) << " global recall threshold (" << recall_global_max_decay_threshold << ") hit at " << global_recall_throttle << "; skipping!" << dendl;
+ if (logger) {
+ logger->inc(l_mdss_global_recall_throttle);
+ }
throttled = true;
break;
}
l_mdss_req_symlink_latency,
l_mdss_req_unlink_latency,
l_mdss_cap_revoke_eviction,
+ l_mdss_cache_trim_throttle,
+ l_mdss_session_recall_throttle,
+ l_mdss_session_recall_throttle2o,
+ l_mdss_global_recall_throttle,
l_mdss_cap_acquisition_throttle,
l_mdss_req_getvxattr_latency,
l_mdss_last,