Skip to content

Commit 748bf47

Browse files
committed
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 <[email protected]>
1 parent 3d1adf7 commit 748bf47

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

kernel/rcu/tree.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4849,6 +4849,8 @@ void __init rcu_init(void)
48494849
// Kick-start any polled grace periods that started early.
48504850
if (!(per_cpu_ptr(&rcu_data, cpu)->mynode->exp_seq_poll_rq & 0x1))
48514851
(void)start_poll_synchronize_rcu_expedited();
4852+
4853+
rcu_test_sync_prims();
48524854
}
48534855

48544856
#include "tree_stall.h"

kernel/rcu/update.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ void rcu_test_sync_prims(void)
220220
{
221221
if (!IS_ENABLED(CONFIG_PROVE_RCU))
222222
return;
223+
pr_info("Running RCU synchronous self tests\n");
223224
synchronize_rcu();
224225
synchronize_rcu_expedited();
225226
}

0 commit comments

Comments
 (0)