Skip to content

Commit

Permalink
rcu: Stop testing RCU-bh and RCU-sched
Browse files Browse the repository at this point in the history
Now that the RCU-bh and RCU-sched update-side functions are simple
wrappers around their RCU counterparts, there isn't a whole lot of
point in testing them.  This commit therefore removes the self-test
capability and removes the corresponding kernel-boot parameters.
It also updates the various rcutorture .boot files to remove the
kernel boot parameters that call for testing RCU-bh and RCU-sched.

Signed-off-by: Paul E. McKenney <[email protected]>
Signed-off-by: Lucas Lee Jing Yi <[email protected]>
Signed-off-by: Carlos Ayrton Lopez Arroyo <[email protected]>
Signed-off-by: clarencelol <[email protected]>
Signed-off-by: Anush02198 <[email protected]>
  • Loading branch information
paulmck authored and Anush02198 committed Jun 30, 2021
1 parent 11fef3c commit 68939b7
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 53 deletions.
6 changes: 0 additions & 6 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4024,12 +4024,6 @@
rcupdate.rcu_self_test= [KNL]
Run the RCU early boot self tests

rcupdate.rcu_self_test_bh= [KNL]
Run the RCU bh early boot self tests

rcupdate.rcu_self_test_sched= [KNL]
Run the RCU sched early boot self tests

rdinit= [KNL]
Format: <full_path>
Run specified binary instead of /init from the ramdisk,
Expand Down
38 changes: 1 addition & 37 deletions kernel/rcu/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,7 @@ void rcu_test_sync_prims(void)
if (!IS_ENABLED(CONFIG_PROVE_RCU))
return;
synchronize_rcu();
synchronize_rcu_bh();
synchronize_sched();
synchronize_rcu_expedited();
synchronize_rcu_bh_expedited();
synchronize_sched_expedited();
}

#if !defined(CONFIG_TINY_RCU) || defined(CONFIG_SRCU)
Expand Down Expand Up @@ -873,15 +869,10 @@ static void __init rcu_tasks_bootup_oddness(void)
#ifdef CONFIG_PROVE_RCU

/*
* Early boot self test parameters, one for each flavor
* Early boot self test parameters.
*/
static bool rcu_self_test;
static bool rcu_self_test_bh;
static bool rcu_self_test_sched;

module_param(rcu_self_test, bool, 0444);
module_param(rcu_self_test_bh, bool, 0444);
module_param(rcu_self_test_sched, bool, 0444);

static int rcu_self_test_counter;

Expand All @@ -898,30 +889,12 @@ static void early_boot_test_call_rcu(void)
call_rcu(&head, test_callback);
}

static void early_boot_test_call_rcu_bh(void)
{
static struct rcu_head head;

call_rcu_bh(&head, test_callback);
}

static void early_boot_test_call_rcu_sched(void)
{
static struct rcu_head head;

call_rcu_sched(&head, test_callback);
}

void rcu_early_boot_tests(void)
{
pr_info("Running RCU self tests\n");

if (rcu_self_test)
early_boot_test_call_rcu();
if (rcu_self_test_bh)
early_boot_test_call_rcu_bh();
if (rcu_self_test_sched)
early_boot_test_call_rcu_sched();
rcu_test_sync_prims();
}

Expand All @@ -934,15 +907,6 @@ static int rcu_verify_early_boot_tests(void)
early_boot_test_counter++;
rcu_barrier();
}
if (rcu_self_test_bh) {
early_boot_test_counter++;
rcu_barrier_bh();
}
if (rcu_self_test_sched) {
early_boot_test_counter++;
rcu_barrier_sched();
}

if (rcu_self_test_counter != early_boot_test_counter) {
WARN_ON(1);
ret = -1;
Expand Down
2 changes: 0 additions & 2 deletions tools/testing/selftests/rcutorture/configs/rcu/TINY02.boot
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
rcupdate.rcu_self_test=1
rcupdate.rcu_self_test_bh=1
rcutorture.torture_type=rcu_bh
2 changes: 1 addition & 1 deletion tools/testing/selftests/rcutorture/configs/rcu/TREE01.boot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rcutorture.torture_type=rcu_bh maxcpus=8 nr_cpus=43
maxcpus=8 nr_cpus=43
rcutree.gp_preinit_delay=3
rcutree.gp_init_delay=3
rcutree.gp_cleanup_delay=3
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/rcutorture/configs/rcu/TREE04.boot
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rcutorture.torture_type=rcu_bh rcutree.rcu_fanout_leaf=4 nohz_full=1-7
rcutree.rcu_fanout_leaf=4 nohz_full=1-7
2 changes: 0 additions & 2 deletions tools/testing/selftests/rcutorture/configs/rcu/TREE05.boot
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
rcutorture.torture_type=sched
rcupdate.rcu_self_test_sched=1
rcutree.gp_preinit_delay=3
rcutree.gp_init_delay=3
rcutree.gp_cleanup_delay=3
2 changes: 0 additions & 2 deletions tools/testing/selftests/rcutorture/configs/rcu/TREE06.boot
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
rcupdate.rcu_self_test=1
rcupdate.rcu_self_test_bh=1
rcupdate.rcu_self_test_sched=1
rcutree.rcu_fanout_exact=1
rcutree.gp_preinit_delay=3
rcutree.gp_init_delay=3
Expand Down
2 changes: 0 additions & 2 deletions tools/testing/selftests/rcutorture/configs/rcu/TREE08.boot
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
rcutorture.torture_type=sched
rcupdate.rcu_self_test=1
rcupdate.rcu_self_test_sched=1
rcutree.rcu_fanout_exact=1
rcu_nocbs=0-7

0 comments on commit 68939b7

Please sign in to comment.