aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rcutorture.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 697c0a0229d4..14480e8b2a24 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -547,6 +547,25 @@ static struct rcu_torture_ops srcu_ops = {
547 .name = "srcu" 547 .name = "srcu"
548}; 548};
549 549
550static void srcu_torture_synchronize_expedited(void)
551{
552 synchronize_srcu_expedited(&srcu_ctl);
553}
554
555static struct rcu_torture_ops srcu_expedited_ops = {
556 .init = srcu_torture_init,
557 .cleanup = srcu_torture_cleanup,
558 .readlock = srcu_torture_read_lock,
559 .read_delay = srcu_read_delay,
560 .readunlock = srcu_torture_read_unlock,
561 .completed = srcu_torture_completed,
562 .deferred_free = rcu_sync_torture_deferred_free,
563 .sync = srcu_torture_synchronize_expedited,
564 .cb_barrier = NULL,
565 .stats = srcu_torture_stats,
566 .name = "srcu_expedited"
567};
568
550/* 569/*
551 * Definitions for sched torture testing. 570 * Definitions for sched torture testing.
552 */ 571 */
@@ -592,7 +611,7 @@ static struct rcu_torture_ops sched_ops = {
592 .name = "sched" 611 .name = "sched"
593}; 612};
594 613
595static struct rcu_torture_ops sched_ops_sync = { 614static struct rcu_torture_ops sched_sync_ops = {
596 .init = rcu_sync_torture_init, 615 .init = rcu_sync_torture_init,
597 .cleanup = NULL, 616 .cleanup = NULL,
598 .readlock = sched_torture_read_lock, 617 .readlock = sched_torture_read_lock,
@@ -1098,8 +1117,8 @@ rcu_torture_init(void)
1098 int firsterr = 0; 1117 int firsterr = 0;
1099 static struct rcu_torture_ops *torture_ops[] = 1118 static struct rcu_torture_ops *torture_ops[] =
1100 { &rcu_ops, &rcu_sync_ops, &rcu_bh_ops, &rcu_bh_sync_ops, 1119 { &rcu_ops, &rcu_sync_ops, &rcu_bh_ops, &rcu_bh_sync_ops,
1101 &sched_expedited_ops, 1120 &srcu_ops, &srcu_expedited_ops,
1102 &srcu_ops, &sched_ops, &sched_ops_sync, }; 1121 &sched_ops, &sched_sync_ops, &sched_expedited_ops, };
1103 1122
1104 mutex_lock(&fullstop_mutex); 1123 mutex_lock(&fullstop_mutex);
1105 1124