Skip to content

Commit

Permalink
rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Feb 28, 2010
1 parent 71da813 commit 622ea68
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kernel/rcutree_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,10 @@ int rcu_needs_cpu(int cpu)
int c = 0;
int thatcpu;

/* Check for being in the holdoff period. */
if (per_cpu(rcu_dyntick_holdoff, cpu) == jiffies)
return rcu_needs_cpu_quick_check(cpu);

/* Don't bother unless we are the last non-dyntick-idle CPU. */
for_each_cpu_not(thatcpu, nohz_cpu_mask)
if (thatcpu != cpu) {
Expand Down Expand Up @@ -1041,10 +1045,8 @@ int rcu_needs_cpu(int cpu)
}

/* If RCU callbacks are still pending, RCU still needs this CPU. */
if (c) {
if (c)
raise_softirq(RCU_SOFTIRQ);
per_cpu(rcu_dyntick_holdoff, cpu) = jiffies;
}
return c;
}

Expand Down

0 comments on commit 622ea68

Please sign in to comment.