summaryrefslogtreecommitdiff
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2018-05-15 15:24:41 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2018-07-12 15:38:55 -0700
commitd72193123c81ae6123d108b3be2096f3f13b25a6 (patch)
tree2ec9801c5c3b7c1f9411ba3a1bc6005d1f154198 /kernel/rcu/tree.c
parent2e3e5e55010105f9d4351f68e15dbc43402a7794 (diff)
downloadlwn-d72193123c81ae6123d108b3be2096f3f13b25a6.tar.gz
lwn-d72193123c81ae6123d108b3be2096f3f13b25a6.zip
rcutorture: Correctly handle grace-period sequence wrap
The new ->gq_seq grace-period sequence numbers must be shifted down, which give artifacts when these numbers wrap. This commit therefore enables rcutorture and rcuperf to handle grace-period sequence numbers even if they do wrap. It does this by allowing a special subtraction function to be specified, and this function subtracts before shifting. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index cbf2bcde5e60..fa219eea0ae7 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -532,7 +532,7 @@ static int rcu_pending(void);
*/
unsigned long rcu_get_gp_seq(void)
{
- return rcu_seq_ctr(READ_ONCE(rcu_state_p->gp_seq));
+ return READ_ONCE(rcu_state_p->gp_seq);
}
EXPORT_SYMBOL_GPL(rcu_get_gp_seq);
@@ -541,7 +541,7 @@ EXPORT_SYMBOL_GPL(rcu_get_gp_seq);
*/
unsigned long rcu_sched_get_gp_seq(void)
{
- return rcu_seq_ctr(READ_ONCE(rcu_sched_state.gp_seq));
+ return READ_ONCE(rcu_sched_state.gp_seq);
}
EXPORT_SYMBOL_GPL(rcu_sched_get_gp_seq);
@@ -550,7 +550,7 @@ EXPORT_SYMBOL_GPL(rcu_sched_get_gp_seq);
*/
unsigned long rcu_bh_get_gp_seq(void)
{
- return rcu_seq_ctr(READ_ONCE(rcu_bh_state.gp_seq));
+ return READ_ONCE(rcu_bh_state.gp_seq);
}
EXPORT_SYMBOL_GPL(rcu_bh_get_gp_seq);