summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney2017-04-19 02:17:35 +0200
committerPaul E. McKenney2017-04-26 20:23:28 +0200
commit7f6733c3c648ddd6cf459c1b80ad388a95452955 (patch)
tree2d463d3a2c5b47f3bfb7098e1000ad043ed0842f /kernel/rcu/tree.c
parentsrcu: Exact tracking of srcu_data structures containing callbacks (diff)
downloadkernel-qcow2-linux-7f6733c3c648ddd6cf459c1b80ad388a95452955.tar.gz
kernel-qcow2-linux-7f6733c3c648ddd6cf459c1b80ad388a95452955.tar.xz
kernel-qcow2-linux-7f6733c3c648ddd6cf459c1b80ad388a95452955.zip
srcu: Make rcutorture writer stalls print SRCU GP state
In the past, SRCU was simple enough that there was little point in making the rcutorture writer stall messages print the SRCU grace-period number state. With the advent of Tree SRCU, this has changed. This commit therefore makes Classic, Tiny, and Tree SRCU report this state to rcutorture as needed. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested-by: Mike Galbraith <efault@gmx.de>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 23aa02587d0f..91fff49d5869 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -704,15 +704,11 @@ void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags,
default:
break;
}
- if (rsp != NULL) {
- *flags = READ_ONCE(rsp->gp_flags);
- *gpnum = READ_ONCE(rsp->gpnum);
- *completed = READ_ONCE(rsp->completed);
+ if (rsp == NULL)
return;
- }
- *flags = 0;
- *gpnum = 0;
- *completed = 0;
+ *flags = READ_ONCE(rsp->gp_flags);
+ *gpnum = READ_ONCE(rsp->gpnum);
+ *completed = READ_ONCE(rsp->completed);
}
EXPORT_SYMBOL_GPL(rcutorture_get_gp_data);