|author||Paul E. McKenney <firstname.lastname@example.org>||2011-11-28 12:28:34 -0800|
|committer||Paul E. McKenney <email@example.com>||2011-12-11 10:32:07 -0800|
rcu: Permit dyntick-idle with callbacks pending
The current implementation of RCU_FAST_NO_HZ prevents CPUs from entering dyntick-idle state if they have RCU callbacks pending. Unfortunately, this has the side-effect of often preventing them from entering this state, especially if at least one other CPU is not in dyntick-idle state. However, the resulting per-tick wakeup is wasteful in many cases: if the CPU has already fully responded to the current RCU grace period, there will be nothing for it to do until this grace period ends, which will frequently take several jiffies. This commit therefore permits a CPU that has done everything that the current grace period has asked of it (rcu_pending() == 0) even if it still as RCU callbacks pending. However, such a CPU posts a timer to wake it up several jiffies later (6 jiffies, based on experience with grace-period lengths). This wakeup is required to handle situations that can result in all CPUs being in dyntick-idle mode, thus failing to ever complete the current grace period. If a CPU wakes up before the timer goes off, then it cancels that timer, thus avoiding spurious wakeups. Signed-off-by: Paul E. McKenney <firstname.lastname@example.org> Signed-off-by: Paul E. McKenney <email@example.com>
Diffstat (limited to 'include/trace')
1 files changed, 2 insertions, 1 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index 8dd6fcb94946..c75418c3ccb8 100644
@@ -288,9 +288,10 @@ TRACE_EVENT(rcu_dyntick,
* "No callbacks": Nothing to do, no callbacks on this CPU.
* "In holdoff": Nothing to do, holding off after unsuccessful attempt.
* "Begin holdoff": Attempt failed, don't retry until next jiffy.
+ * "Dyntick with callbacks": Entering dyntick-idle despite callbacks.
* "More callbacks": Still more callbacks, try again to clear them out.
* "Callbacks drained": All callbacks processed, off to dyntick idle!
- * "CPU awakened at GP end":
+ * "Timer": Timer fired to cause CPU to continue processing callbacks.