Skip to content

Commit 9cf8fc6

Browse files
committed
rcutorture: Add a test for synchronize_rcu_mult()
This commit adds a crude test for synchronize_rcu_mult(). This is currently a smoke test rather than a high-quality stress test. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent b3d7315 commit 9cf8fc6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

kernel/rcu/rcutorture.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <linux/err.h>
2121
#include <linux/spinlock.h>
2222
#include <linux/smp.h>
23-
#include <linux/rcupdate.h>
23+
#include <linux/rcupdate_wait.h>
2424
#include <linux/interrupt.h>
2525
#include <linux/sched/signal.h>
2626
#include <uapi/linux/sched/types.h>
@@ -665,6 +665,11 @@ static void rcu_tasks_torture_deferred_free(struct rcu_torture *p)
665665
call_rcu_tasks(&p->rtort_rcu, rcu_torture_cb);
666666
}
667667

668+
static void synchronize_rcu_mult_test(void)
669+
{
670+
synchronize_rcu_mult(call_rcu_tasks, call_rcu);
671+
}
672+
668673
static struct rcu_torture_ops tasks_ops = {
669674
.ttype = RCU_TASKS_FLAVOR,
670675
.init = rcu_sync_torture_init,
@@ -674,7 +679,7 @@ static struct rcu_torture_ops tasks_ops = {
674679
.get_gp_seq = rcu_no_completed,
675680
.deferred_free = rcu_tasks_torture_deferred_free,
676681
.sync = synchronize_rcu_tasks,
677-
.exp_sync = synchronize_rcu_tasks,
682+
.exp_sync = synchronize_rcu_mult_test,
678683
.call = call_rcu_tasks,
679684
.cb_barrier = rcu_barrier_tasks,
680685
.fqs = NULL,

0 commit comments

Comments
 (0)