Commit 9cf8fc6f authored by Paul E. McKenney's avatar Paul E. McKenney

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: default avatarPaul E. McKenney <paulmck@kernel.org>
parent b3d73156
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/rcupdate.h> #include <linux/rcupdate_wait.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/sched/signal.h> #include <linux/sched/signal.h>
#include <uapi/linux/sched/types.h> #include <uapi/linux/sched/types.h>
...@@ -665,6 +665,11 @@ static void rcu_tasks_torture_deferred_free(struct rcu_torture *p) ...@@ -665,6 +665,11 @@ static void rcu_tasks_torture_deferred_free(struct rcu_torture *p)
call_rcu_tasks(&p->rtort_rcu, rcu_torture_cb); call_rcu_tasks(&p->rtort_rcu, rcu_torture_cb);
} }
static void synchronize_rcu_mult_test(void)
{
synchronize_rcu_mult(call_rcu_tasks, call_rcu);
}
static struct rcu_torture_ops tasks_ops = { static struct rcu_torture_ops tasks_ops = {
.ttype = RCU_TASKS_FLAVOR, .ttype = RCU_TASKS_FLAVOR,
.init = rcu_sync_torture_init, .init = rcu_sync_torture_init,
...@@ -674,7 +679,7 @@ static struct rcu_torture_ops tasks_ops = { ...@@ -674,7 +679,7 @@ static struct rcu_torture_ops tasks_ops = {
.get_gp_seq = rcu_no_completed, .get_gp_seq = rcu_no_completed,
.deferred_free = rcu_tasks_torture_deferred_free, .deferred_free = rcu_tasks_torture_deferred_free,
.sync = synchronize_rcu_tasks, .sync = synchronize_rcu_tasks,
.exp_sync = synchronize_rcu_tasks, .exp_sync = synchronize_rcu_mult_test,
.call = call_rcu_tasks, .call = call_rcu_tasks,
.cb_barrier = rcu_barrier_tasks, .cb_barrier = rcu_barrier_tasks,
.fqs = NULL, .fqs = NULL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment