diff options
author | 2022-12-19 17:02:20 -0800 | |
---|---|---|
committer | 2023-01-03 17:28:34 -0800 | |
commit | 748bf47a89d722c7e77f8700705e2189be14e99e (patch) | |
tree | 5652bd9bbe1fcc5e4763c48c5206d4e1c66c3118 | |
parent | rcu: Make rcu_blocking_is_gp() stop early-boot might_sleep() (diff) | |
download | wireguard-linux-748bf47a89d722c7e77f8700705e2189be14e99e.tar.xz wireguard-linux-748bf47a89d722c7e77f8700705e2189be14e99e.zip |
rcu: Test synchronous RCU grace periods at the end of rcu_init()
This commit tests synchronize_rcu() and synchronize_rcu_expedited()
at the end of rcu_init(), in addition to the test already at the
beginning of that function. These tests are run only in kernels built
with CONFIG_PROVE_RCU=y.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | kernel/rcu/tree.c | 2 | ||||
-rw-r--r-- | kernel/rcu/update.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 15f976506472..80b84ae285b4 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -4849,6 +4849,8 @@ void __init rcu_init(void) // Kick-start any polled grace periods that started early. if (!(per_cpu_ptr(&rcu_data, cpu)->mynode->exp_seq_poll_rq & 0x1)) (void)start_poll_synchronize_rcu_expedited(); + + rcu_test_sync_prims(); } #include "tree_stall.h" diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c index f5e6a2f95a2a..587b97c40191 100644 --- a/kernel/rcu/update.c +++ b/kernel/rcu/update.c @@ -220,6 +220,7 @@ void rcu_test_sync_prims(void) { if (!IS_ENABLED(CONFIG_PROVE_RCU)) return; + pr_info("Running RCU synchronous self tests\n"); synchronize_rcu(); synchronize_rcu_expedited(); } |