[xen master] RCU: make the period of the idle timer adaptive
Author: Dario Faggioli <[hidden email]>
AuthorDate: Mon Oct 9 13:24:01 2017 +0200
Commit: Jan Beulich <[hidden email]>
CommitDate: Mon Oct 9 13:24:01 2017 +0200
RCU: make the period of the idle timer adaptive
Basically, if the RCU idle timer, when (if!) it fires,
finds that the grace period isn't over, we increase the
timer's period (i.e., it will fire later, next time).
If, OTOH, it finds the grace period is already finished,
we decrease the timer's period (i.e., it will fire a bit
earlier next time).
The goal is to let the period timer sefl-adjust to a
number of 'misses', of the order of 1%.
+ * Increment and decrement values for the idle timer handler. The algorithm
+ * works as follows:
+ * - if the timer actually fires, and it finds out that the grace period isn't
+ * over yet, we add IDLE_TIMER_PERIOD_INCR to the timer's period;
+ * - if the timer actually fires and it finds the grace period over, we
+ * subtract IDLE_TIMER_PERIOD_DECR from the timer's period.
+#define IDLE_TIMER_PERIOD_INCR MILLISECS(10)
+#define IDLE_TIMER_PERIOD_DECR MICROSECS(100)
static DEFINE_PER_CPU(struct rcu_data, rcu_data);