aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutorture.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2009-10-25 22:03:52 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-26 04:40:30 -0400
commit804bb8370522a569bd3a732b9de5fbd55e26f155 (patch)
tree4b20245f8ca20c99343e7c3f0f8e8cb9c14eed7a /kernel/rcutorture.c
parent0cd397d33608ae6c97d2ee6c8c43462b419b7e26 (diff)
rcu: Add synchronize_srcu_expedited() to the rcutorture test suite
Adds the "srcu_expedited" torture type, and also renames sched_ops_sync to sched_sync_ops for consistency while we are in this file. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: dipankar@in.ibm.com Cc: mathieu.desnoyers@polymtl.ca Cc: dvhltc@us.ibm.com Cc: niv@us.ibm.com Cc: peterz@infradead.org Cc: rostedt@goodmis.org Cc: Valdis.Kletnieks@vt.edu Cc: dhowells@redhat.com Cc: avi@redhat.com Cc: mtosatti@redhat.com LKML-Reference: <12565226353636-git-send-email-> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/rcutorture.c')
-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