aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r--kernel/rcutree_plugin.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 38426ef1bcd6..764b5fcc7c56 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -1182,7 +1182,6 @@ int rcu_needs_cpu(int cpu)
1182{ 1182{
1183 int c = 0; 1183 int c = 0;
1184 int snap; 1184 int snap;
1185 int snap_nmi;
1186 int thatcpu; 1185 int thatcpu;
1187 1186
1188 /* Check for being in the holdoff period. */ 1187 /* Check for being in the holdoff period. */
@@ -1193,10 +1192,10 @@ int rcu_needs_cpu(int cpu)
1193 for_each_online_cpu(thatcpu) { 1192 for_each_online_cpu(thatcpu) {
1194 if (thatcpu == cpu) 1193 if (thatcpu == cpu)
1195 continue; 1194 continue;
1196 snap = per_cpu(rcu_dynticks, thatcpu).dynticks; 1195 snap = atomic_add_return(0, &per_cpu(rcu_dynticks,
1197 snap_nmi = per_cpu(rcu_dynticks, thatcpu).dynticks_nmi; 1196 thatcpu).dynticks);
1198 smp_mb(); /* Order sampling of snap with end of grace period. */ 1197 smp_mb(); /* Order sampling of snap with end of grace period. */
1199 if (((snap & 0x1) != 0) || ((snap_nmi & 0x1) != 0)) { 1198 if ((snap & 0x1) != 0) {
1200 per_cpu(rcu_dyntick_drain, cpu) = 0; 1199 per_cpu(rcu_dyntick_drain, cpu) = 0;
1201 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1; 1200 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1;
1202 return rcu_needs_cpu_quick_check(cpu); 1201 return rcu_needs_cpu_quick_check(cpu);