Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
rcutorture.c File Reference
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/err.h>
#include <linux/spinlock.h>
#include <linux/smp.h>
#include <linux/rcupdate.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/atomic.h>
#include <linux/bitops.h>
#include <linux/completion.h>
#include <linux/moduleparam.h>
#include <linux/percpu.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/freezer.h>
#include <linux/cpu.h>
#include <linux/delay.h>
#include <linux/stat.h>
#include <linux/srcu.h>
#include <linux/slab.h>
#include <asm/byteorder.h>

Go to the source code of this file.

Data Structures

struct  rcu_torture
 
struct  rcu_random_state
 
struct  rcu_torture_ops
 
struct  rcu_boost_inflight
 

Macros

#define TORTURE_FLAG   "-torture:"
 
#define PRINTK_STRING(s)   do { pr_alert("%s" TORTURE_FLAG s "\n", torture_type); } while (0)
 
#define VERBOSE_PRINTK_STRING(s)   do { if (verbose) pr_alert("%s" TORTURE_FLAG s "\n", torture_type); } while (0)
 
#define VERBOSE_PRINTK_ERRSTRING(s)   do { if (verbose) pr_alert("%s" TORTURE_FLAG "!!! " s "\n", torture_type); } while (0)
 
#define RCU_TORTURE_PIPE_LEN   10
 
#define RCUTORTURE_RUNNABLE_INIT   0
 
#define rcu_can_boost()   0
 
#define FULLSTOP_DONTSTOP   0 /* Normal operation. */
 
#define FULLSTOP_SHUTDOWN   1 /* System shutdown with rcutorture running. */
 
#define FULLSTOP_RMMOD   2 /* Normal rmmod of rcutorture. */
 
#define RCU_RANDOM_MULT   39916801 /* prime */
 
#define RCU_RANDOM_ADD   479001701 /* prime */
 
#define RCU_RANDOM_REFRESH   10000
 
#define DEFINE_RCU_RANDOM(name)   struct rcu_random_state name = { 0, 0 }
 

Functions

 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Paul E. McKenney <[email protected]> and Josh Triplett <[email protected]>")
 
 module_param (nreaders, int, 0444)
 
 MODULE_PARM_DESC (nreaders,"Number of RCU reader threads")
 
 module_param (nfakewriters, int, 0444)
 
 MODULE_PARM_DESC (nfakewriters,"Number of RCU fake writer threads")
 
 module_param (stat_interval, int, 0644)
 
 MODULE_PARM_DESC (stat_interval,"Number of seconds between stats printk()s")
 
 module_param (verbose, bool, 0444)
 
 MODULE_PARM_DESC (verbose,"Enable verbose debugging printk()s")
 
 module_param (test_no_idle_hz, bool, 0444)
 
 MODULE_PARM_DESC (test_no_idle_hz,"Test support for tickless idle CPUs")
 
 module_param (shuffle_interval, int, 0444)
 
 MODULE_PARM_DESC (shuffle_interval,"Number of seconds between shuffles")
 
 module_param (stutter, int, 0444)
 
 MODULE_PARM_DESC (stutter,"Number of seconds to run/halt test")
 
 module_param (irqreader, int, 0444)
 
 MODULE_PARM_DESC (irqreader,"Allow RCU readers from irq handlers")
 
 module_param (fqs_duration, int, 0444)
 
 MODULE_PARM_DESC (fqs_duration,"Duration of fqs bursts (us)")
 
 module_param (fqs_holdoff, int, 0444)
 
 MODULE_PARM_DESC (fqs_holdoff,"Holdoff time within fqs bursts (us)")
 
 module_param (fqs_stutter, int, 0444)
 
 MODULE_PARM_DESC (fqs_stutter,"Wait time between fqs bursts (s)")
 
 module_param (n_barrier_cbs, int, 0444)
 
 MODULE_PARM_DESC (n_barrier_cbs,"# of callbacks/kthreads for barrier testing")
 
 module_param (onoff_interval, int, 0444)
 
 MODULE_PARM_DESC (onoff_interval,"Time between CPU hotplugs (s), 0=disable")
 
 module_param (onoff_holdoff, int, 0444)
 
 MODULE_PARM_DESC (onoff_holdoff,"Time after boot before CPU hotplugs (s)")
 
 module_param (shutdown_secs, int, 0444)
 
 MODULE_PARM_DESC (shutdown_secs,"Shutdown time (s), zero to disable.")
 
 module_param (stall_cpu, int, 0444)
 
 MODULE_PARM_DESC (stall_cpu,"Stall duration (s), zero to disable.")
 
 module_param (stall_cpu_holdoff, int, 0444)
 
 MODULE_PARM_DESC (stall_cpu_holdoff,"Time to wait before starting stall (s).")
 
 module_param (test_boost, int, 0444)
 
 MODULE_PARM_DESC (test_boost,"Test RCU prio boost: 0=no, 1=maybe, 2=yes.")
 
 module_param (test_boost_interval, int, 0444)
 
 MODULE_PARM_DESC (test_boost_interval,"Interval between boost tests, seconds.")
 
 module_param (test_boost_duration, int, 0444)
 
 MODULE_PARM_DESC (test_boost_duration,"Duration of each boost test, seconds.")
 
 module_param (torture_type, charp, 0444)
 
 MODULE_PARM_DESC (torture_type,"Type of RCU to torture (rcu, rcu_bh, srcu)")
 
 module_param (rcutorture_runnable, int, 0444)
 
 MODULE_PARM_DESC (rcutorture_runnable,"Start rcutorture at boot")
 
 DEFINE_MUTEX (boost_mutex)
 
void rcutorture_trace_dump (void)
 
void rcu_torture_barrier_cbf (struct rcu_head *rcu)
 
 module_init (rcu_torture_init)
 
 module_exit (rcu_torture_cleanup)
 

Variables

int rcutorture_runnable = RCUTORTURE_RUNNABLE_INIT
 

Macro Definition Documentation

#define DEFINE_RCU_RANDOM (   name)    struct rcu_random_state name = { 0, 0 }

Definition at line 307 of file rcutorture.c.

#define FULLSTOP_DONTSTOP   0 /* Normal operation. */

Definition at line 222 of file rcutorture.c.

#define FULLSTOP_RMMOD   2 /* Normal rmmod of rcutorture. */

Definition at line 224 of file rcutorture.c.

#define FULLSTOP_SHUTDOWN   1 /* System shutdown with rcutorture running. */

Definition at line 223 of file rcutorture.c.

#define PRINTK_STRING (   s)    do { pr_alert("%s" TORTURE_FLAG s "\n", torture_type); } while (0)

Definition at line 122 of file rcutorture.c.

#define rcu_can_boost ( )    0

Definition at line 207 of file rcutorture.c.

#define RCU_RANDOM_ADD   479001701 /* prime */

Definition at line 304 of file rcutorture.c.

#define RCU_RANDOM_MULT   39916801 /* prime */

Definition at line 303 of file rcutorture.c.

#define RCU_RANDOM_REFRESH   10000

Definition at line 305 of file rcutorture.c.

#define RCU_TORTURE_PIPE_LEN   10

Definition at line 148 of file rcutorture.c.

#define RCUTORTURE_RUNNABLE_INIT   0

Definition at line 198 of file rcutorture.c.

#define TORTURE_FLAG   "-torture:"

Definition at line 121 of file rcutorture.c.

#define VERBOSE_PRINTK_ERRSTRING (   s)    do { if (verbose) pr_alert("%s" TORTURE_FLAG "!!! " s "\n", torture_type); } while (0)

Definition at line 126 of file rcutorture.c.

#define VERBOSE_PRINTK_STRING (   s)    do { if (verbose) pr_alert("%s" TORTURE_FLAG s "\n", torture_type); } while (0)

Definition at line 124 of file rcutorture.c.

Function Documentation

DEFINE_MUTEX ( boost_mutex  )
MODULE_AUTHOR ( "Paul E. McKenney <[email protected]> and Josh Triplett <[email protected]>"  )
module_exit ( rcu_torture_cleanup  )
module_init ( rcu_torture_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( nreaders  ,
int  ,
0444   
)
module_param ( nfakewriters  ,
int  ,
0444   
)
module_param ( stat_interval  ,
int  ,
0644   
)
module_param ( verbose  ,
bool  ,
0444   
)
module_param ( test_no_idle_hz  ,
bool  ,
0444   
)
module_param ( shuffle_interval  ,
int  ,
0444   
)
module_param ( stutter  ,
int  ,
0444   
)
module_param ( irqreader  ,
int  ,
0444   
)
module_param ( fqs_duration  ,
int  ,
0444   
)
module_param ( fqs_holdoff  ,
int  ,
0444   
)
module_param ( fqs_stutter  ,
int  ,
0444   
)
module_param ( n_barrier_cbs  ,
int  ,
0444   
)
module_param ( onoff_interval  ,
int  ,
0444   
)
module_param ( onoff_holdoff  ,
int  ,
0444   
)
module_param ( shutdown_secs  ,
int  ,
0444   
)
module_param ( stall_cpu  ,
int  ,
0444   
)
module_param ( stall_cpu_holdoff  ,
int  ,
0444   
)
module_param ( test_boost  ,
int  ,
0444   
)
module_param ( test_boost_interval  ,
int  ,
0444   
)
module_param ( test_boost_duration  ,
int  ,
0444   
)
module_param ( torture_type  ,
charp  ,
0444   
)
module_param ( rcutorture_runnable  ,
int  ,
0444   
)
MODULE_PARM_DESC ( nreaders  ,
"Number of RCU reader threads  
)
MODULE_PARM_DESC ( nfakewriters  ,
"Number of RCU fake writer threads  
)
MODULE_PARM_DESC ( stat_interval  ,
"Number of seconds between stats printk()s  
)
MODULE_PARM_DESC ( verbose  ,
"Enable verbose debugging printk()s  
)
MODULE_PARM_DESC ( test_no_idle_hz  ,
"Test support for tickless idle CPUs"   
)
MODULE_PARM_DESC ( shuffle_interval  ,
"Number of seconds between shuffles"   
)
MODULE_PARM_DESC ( stutter  ,
"Number of seconds to run/halt test  
)
MODULE_PARM_DESC ( irqreader  ,
"Allow RCU readers from irq handlers"   
)
MODULE_PARM_DESC ( fqs_duration  ,
"Duration of fqs bursts (us)"   
)
MODULE_PARM_DESC ( fqs_holdoff  ,
"Holdoff time within fqs bursts (us)"   
)
MODULE_PARM_DESC ( fqs_stutter  ,
"Wait time between fqs bursts (s)"   
)
MODULE_PARM_DESC ( n_barrier_cbs  ,
"# of callbacks/kthreads for barrier testing"   
)
MODULE_PARM_DESC ( onoff_interval  ,
"Time between CPU hotplugs  
)
MODULE_PARM_DESC ( onoff_holdoff  ,
"Time after boot before CPU hotplugs (s)"   
)
MODULE_PARM_DESC ( shutdown_secs  ,
"Shutdown time   s,
zero to disable."   
)
MODULE_PARM_DESC ( stall_cpu  ,
"Stall duration   s,
zero to disable."   
)
MODULE_PARM_DESC ( stall_cpu_holdoff  ,
"Time to wait before starting stall (s)."   
)
MODULE_PARM_DESC ( test_boost  ,
"Test RCU prio boost:  0 = no,
= maybe 
)
MODULE_PARM_DESC ( test_boost_interval  ,
"Interval between boost  tests,
seconds."   
)
MODULE_PARM_DESC ( test_boost_duration  ,
"Duration of each boost  test,
seconds."   
)
MODULE_PARM_DESC ( torture_type  ,
"Type of RCU to torture (rcu, rcu_bh, srcu)"   
)
MODULE_PARM_DESC ( rcutorture_runnable  ,
"Start rcutorture at boot"   
)
void rcu_torture_barrier_cbf ( struct rcu_head rcu)

Definition at line 1671 of file rcutorture.c.

void rcutorture_trace_dump ( void  )

Definition at line 1050 of file rcutorture.c.

Variable Documentation

int rcutorture_runnable = RCUTORTURE_RUNNABLE_INIT

Definition at line 200 of file rcutorture.c.