aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_plugin.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-12 04:08:07 -0400
committerIngo Molnar <mingo@elte.hu>2011-05-19 17:25:29 -0400
commit80d02085d99039b3b7f3a73c8896226b0cb1ba07 (patch)
treec310902423ecb00effadcb59c60cbf118d4037cb /kernel/rcutree_plugin.h
parent11c476f31a0fabc6e604da5b09a6590b57c3fb20 (diff)
Revert "rcu: Decrease memory-barrier usage based on semi-formal proof"
This reverts commit e59fb3120becfb36b22ddb8bd27d065d3cdca499. This reversion was due to (extreme) boot-time slowdowns on SPARC seen by Yinghai Lu and on x86 by Ingo . This is a non-trivial reversion due to intervening commits. Conflicts: Documentation/RCU/trace.txt kernel/rcutree.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r--kernel/rcutree_plugin.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index ed339702481d..3f6559a5f5cd 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -1520,6 +1520,7 @@ int rcu_needs_cpu(int cpu)
1520{ 1520{
1521 int c = 0; 1521 int c = 0;
1522 int snap; 1522 int snap;
1523 int snap_nmi;
1523 int thatcpu; 1524 int thatcpu;
1524 1525
1525 /* Check for being in the holdoff period. */ 1526 /* Check for being in the holdoff period. */
@@ -1530,10 +1531,10 @@ int rcu_needs_cpu(int cpu)
1530 for_each_online_cpu(thatcpu) { 1531 for_each_online_cpu(thatcpu) {
1531 if (thatcpu == cpu) 1532 if (thatcpu == cpu)
1532 continue; 1533 continue;
1533 snap = atomic_add_return(0, &per_cpu(rcu_dynticks, 1534 snap = per_cpu(rcu_dynticks, thatcpu).dynticks;
1534 thatcpu).dynticks); 1535 snap_nmi = per_cpu(rcu_dynticks, thatcpu).dynticks_nmi;
1535 smp_mb(); /* Order sampling of snap with end of grace period. */ 1536 smp_mb(); /* Order sampling of snap with end of grace period. */
1536 if ((snap & 0x1) != 0) { 1537 if (((snap & 0x1) != 0) || ((snap_nmi & 0x1) != 0)) {
1537 per_cpu(rcu_dyntick_drain, cpu) = 0; 1538 per_cpu(rcu_dyntick_drain, cpu) = 0;
1538 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1; 1539 per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1;
1539 return rcu_needs_cpu_quick_check(cpu); 1540 return rcu_needs_cpu_quick_check(cpu);