diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-12-04 21:42:03 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-02-17 18:01:42 -0500 |
commit | cb1e78cfa267453bb19e7edafd214c03834b664c (patch) | |
tree | 1211ed872c631b1cd71052cbd20e0ca89221cb51 /kernel/rcu/tree.c | |
parent | 87de1cfdc55b16b794e245b07322340725149d62 (diff) |
rcu: Remove ACCESS_ONCE() from jiffies
Because jiffies is one of a very few variables marked "volatile", there
is no need to use ACCESS_ONCE() when accessing it. This commit therefore
removes the redundant ACCESS_ONCE() wrappers.
Reported by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r-- | kernel/rcu/tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 321feef0f5c0..73c3cd2b87ac 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -837,7 +837,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp, | |||
837 | * to the next. Only do this for the primary flavor of RCU. | 837 | * to the next. Only do this for the primary flavor of RCU. |
838 | */ | 838 | */ |
839 | if (rdp->rsp == rcu_state && | 839 | if (rdp->rsp == rcu_state && |
840 | ULONG_CMP_GE(ACCESS_ONCE(jiffies), rdp->rsp->jiffies_resched)) { | 840 | ULONG_CMP_GE(jiffies, rdp->rsp->jiffies_resched)) { |
841 | rdp->rsp->jiffies_resched += 5; | 841 | rdp->rsp->jiffies_resched += 5; |
842 | resched_cpu(rdp->cpu); | 842 | resched_cpu(rdp->cpu); |
843 | } | 843 | } |
@@ -847,7 +847,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp, | |||
847 | 847 | ||
848 | static void record_gp_stall_check_time(struct rcu_state *rsp) | 848 | static void record_gp_stall_check_time(struct rcu_state *rsp) |
849 | { | 849 | { |
850 | unsigned long j = ACCESS_ONCE(jiffies); | 850 | unsigned long j = jiffies; |
851 | unsigned long j1; | 851 | unsigned long j1; |
852 | 852 | ||
853 | rsp->gp_start = j; | 853 | rsp->gp_start = j; |
@@ -1005,7 +1005,7 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp) | |||
1005 | 1005 | ||
1006 | if (rcu_cpu_stall_suppress || !rcu_gp_in_progress(rsp)) | 1006 | if (rcu_cpu_stall_suppress || !rcu_gp_in_progress(rsp)) |
1007 | return; | 1007 | return; |
1008 | j = ACCESS_ONCE(jiffies); | 1008 | j = jiffies; |
1009 | 1009 | ||
1010 | /* | 1010 | /* |
1011 | * Lots of memory barriers to reject false positives. | 1011 | * Lots of memory barriers to reject false positives. |