uint64_t recall = std::min<uint64_t>(recall_max_caps, num_caps-newlim);
newlim = num_caps-recall;
const uint64_t session_recall_throttle = session->get_recall_caps_throttle();
+ const uint64_t session_recall_throttle2o = session->get_recall_caps_throttle2o();
const uint64_t global_recall_throttle = recall_throttle.get(ceph_clock_now());
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;
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;
+ 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;
throttled = true;
* throttle future RECALL messages).
*/
recall_caps_throttle.hit(ceph_clock_now(), count);
+ recall_caps_throttle2o.hit(ceph_clock_now(), count);
recall_caps.hit(ceph_clock_now(), count);
return new_change;
}
mutable DecayCounter release_caps;
// throttle on caps recalled
mutable DecayCounter recall_caps_throttle;
+ // second order throttle that prevents recalling too quickly
+ mutable DecayCounter recall_caps_throttle2o;
// New limit in SESSION_RECALL
uint32_t recall_limit = 0;
double get_recall_caps_throttle() const {
return recall_caps_throttle.get(ceph_clock_now());
}
+ double get_recall_caps_throttle2o() const {
+ return recall_caps_throttle2o.get(ceph_clock_now());
+ }
double get_recall_caps() const {
return recall_caps.get(ceph_clock_now());
}
recall_caps(ceph_clock_now(), g_conf->get_val<double>("mds_recall_warning_decay_rate")),
release_caps(ceph_clock_now(), g_conf->get_val<double>("mds_recall_warning_decay_rate")),
recall_caps_throttle(ceph_clock_now(), g_conf->get_val<double>("mds_recall_max_decay_rate")),
+ recall_caps_throttle2o(ceph_clock_now(), 0.5),
birth_time(clock::now()),
auth_caps(g_ceph_context),
item_session_list(this),