|author||Paul E. McKenney <email@example.com>||2014-06-20 16:49:01 -0700|
|committer||Paul E. McKenney <firstname.lastname@example.org>||2014-06-23 11:19:32 -0700|
rcu: Reduce overhead of cond_resched() checks for RCU
Commit ac1bea85781e (Make cond_resched() report RCU quiescent states) fixed a problem where a CPU looping in the kernel with but one runnable task would give RCU CPU stall warnings, even if the in-kernel loop contained cond_resched() calls. Unfortunately, in so doing, it introduced performance regressions in Anton Blanchard's will-it-scale "open1" test. The problem appears to be not so much the increased cond_resched() path length as an increase in the rate at which grace periods complete, which increased per-update grace-period overhead. This commit takes a different approach to fixing this bug, mainly by moving the RCU-visible quiescent state from cond_resched() to rcu_note_context_switch(), and by further reducing the check to a simple non-zero test of a single per-CPU variable. However, this approach requires that the force-quiescent-state processing send resched IPIs to the offending CPUs. These will be sent only once the grace period has reached an age specified by the boot/sysfs parameter rcutree.jiffies_till_sched_qs, or once the grace period reaches an age halfway to the point at which RCU CPU stall warnings will be emitted, whichever comes first. Reported-by: Dave Hansen <email@example.com> Signed-off-by: Paul E. McKenney <firstname.lastname@example.org> Cc: Andi Kleen <email@example.com> Cc: Christoph Lameter <firstname.lastname@example.org> Cc: Mike Galbraith <email@example.com> Cc: Eric Dumazet <firstname.lastname@example.org> Reviewed-by: Josh Triplett <email@example.com> [ paulmck: Made rcu_momentary_dyntick_idle() as suggested by the ktest build robot. Also fixed smp_mb() comment as noted by Oleg Nesterov. ] Merge with e552592e (Reduce overhead of cond_resched() checks for RCU) Signed-off-by: Paul E. McKenney <firstname.lastname@example.org>
Diffstat (limited to 'kernel/rcu/update.c')
1 files changed, 0 insertions, 18 deletions
diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 0fb691e63ce6..bc7883570530 100644
@@ -350,21 +350,3 @@ static int __init check_cpu_stall_init(void)
#endif /* #ifdef CONFIG_RCU_STALL_COMMON */
- * Hooks for cond_resched() and friends to avoid RCU CPU stall warnings.
- * Report a set of RCU quiescent states, for use by cond_resched()
- * and friends. Out of line due to being called infrequently.
- __this_cpu_write(rcu_cond_resched_count, 0);