Commit 622ea685f1fafdf84d612440535c84341f0860b8

Authored by Paul E. McKenney
Committed by Ingo Molnar
1 parent 71da81324c

rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU

Make the holdoff only happen when the full number of attempts
have been made.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <1267311188-16603-1-git-send-email-paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

kernel/rcutree_plugin.h
... ... @@ -1010,6 +1010,10 @@
1010 1010 int c = 0;
1011 1011 int thatcpu;
1012 1012  
  1013 + /* Check for being in the holdoff period. */
  1014 + if (per_cpu(rcu_dyntick_holdoff, cpu) == jiffies)
  1015 + return rcu_needs_cpu_quick_check(cpu);
  1016 +
1013 1017 /* Don't bother unless we are the last non-dyntick-idle CPU. */
1014 1018 for_each_cpu_not(thatcpu, nohz_cpu_mask)
1015 1019 if (thatcpu != cpu) {
1016 1020  
... ... @@ -1041,10 +1045,8 @@
1041 1045 }
1042 1046  
1043 1047 /* If RCU callbacks are still pending, RCU still needs this CPU. */
1044   - if (c) {
  1048 + if (c)
1045 1049 raise_softirq(RCU_SOFTIRQ);
1046   - per_cpu(rcu_dyntick_holdoff, cpu) = jiffies;
1047   - }
1048 1050 return c;
1049 1051 }
1050 1052