[PATCH tip/core/rcu 3/5] rcu: Sort rcutorture module parameters

2013-08-19 Thread Paul E. McKenney
From: "Paul E. McKenney" 

There are getting to be too many module parameters to permit the current
semi-random order, so this patch orders them.

Signed-off-by: Paul E. McKenney 
Reviewed-by: Josh Triplett 
---
 kernel/rcutorture.c | 101 +---
 1 file changed, 49 insertions(+), 52 deletions(-)

diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 10820b7..949a8f2 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -52,81 +52,78 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Paul E. McKenney  and Josh Triplett 
");
 
-static int nreaders = -1;  /* # reader threads, defaults to 2*ncpus */
-static int nfakewriters = 4;   /* # fake writer threads */
-static int stat_interval = 60; /* Interval between stats, in seconds. */
-   /*  Zero means "only at end of test". */
-static bool verbose;   /* Print more debug info. */
-static bool test_no_idle_hz = true;
-   /* Test RCU support for tickless idle CPUs. */
-static int shuffle_interval = 3; /* Interval between shuffles (in sec)*/
-static int stutter = 5;/* Start/stop testing interval (in sec) 
*/
-static int irqreader = 1;  /* RCU readers from irq (timers). */
-static int fqs_duration;   /* Duration of bursts (us), 0 to disable. */
-static int fqs_holdoff;/* Hold time within burst (us). */
-static int fqs_stutter = 3;/* Wait time between bursts (s). */
-static bool gp_exp;/* Use expedited GP wait primitives. */
-static bool gp_normal; /* Use normal GP wait primitives. */
-static int n_barrier_cbs;  /* Number of callbacks to test RCU barriers. */
-static int object_debug;   /* Test object-debug double call_rcu()?. */
-static int onoff_interval; /* Wait time between CPU hotplugs, 0=disable. */
-static int onoff_holdoff;  /* Seconds after boot before CPU hotplugs. */
-static int shutdown_secs;  /* Shutdown time (s).  <=0 for no shutdown. */
-static int stall_cpu;  /* CPU-stall duration (s).  0 for no stall. */
-static int stall_cpu_holdoff = 10; /* Time to wait until stall (s).  */
-static int test_boost = 1; /* Test RCU prio boost: 0=no, 1=maybe, 2=yes. */
-static int test_boost_interval = 7; /* Interval between boost tests, seconds. 
*/
-static int test_boost_duration = 4; /* Duration of each boost test, seconds. */
-static char *torture_type = "rcu"; /* What RCU implementation to torture. */
-
-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");
+static int fqs_duration;
 module_param(fqs_duration, int, 0444);
-MODULE_PARM_DESC(fqs_duration, "Duration of fqs bursts (us)");
+MODULE_PARM_DESC(fqs_duration, "Duration of fqs bursts (us), 0 to disable");
+static int fqs_holdoff;
 module_param(fqs_holdoff, int, 0444);
 MODULE_PARM_DESC(fqs_holdoff, "Holdoff time within fqs bursts (us)");
+static int fqs_stutter = 3;
 module_param(fqs_stutter, int, 0444);
 MODULE_PARM_DESC(fqs_stutter, "Wait time between fqs bursts (s)");
-module_param(gp_normal, bool, 0444);
-MODULE_PARM_DESC(gp_normal, "Use normal (non-expedited) GP wait primitives");
+static bool gp_exp;
 module_param(gp_exp, bool, 0444);
 MODULE_PARM_DESC(gp_exp, "Use expedited GP wait primitives");
+static bool gp_normal;
+module_param(gp_normal, bool, 0444);
+MODULE_PARM_DESC(gp_normal, "Use normal (non-expedited) GP wait primitives");
+static int irqreader = 1;
+module_param(irqreader, int, 0444);
+MODULE_PARM_DESC(irqreader, "Allow RCU readers from irq handlers");
+static int n_barrier_cbs;
 module_param(n_barrier_cbs, int, 0444);
 MODULE_PARM_DESC(n_barrier_cbs, "# of callbacks/kthreads for barrier testing");
+static int nfakewriters = 4;
+module_param(nfakewriters, int, 0444);
+MODULE_PARM_DESC(nfakewriters, "Number of RCU fake writer threads");
+static int nreaders = -1;
+module_param(nreaders, int, 0444);
+MODULE_PARM_DESC(nreaders, "Number of RCU reader threads");
+static int object_debug;
 module_param(object_debug, int, 0444);
 MODULE_PARM_DESC(object_debug, "Enable debug-object double call_rcu() 
testing");
-module_param(onoff_interval, int, 0444);
-MODULE_PARM_DESC(onoff_inter

Re: [PATCH tip/core/rcu 3/5] rcu: Sort rcutorture module parameters

2013-08-18 Thread Paul E. McKenney
On Sat, Aug 17, 2013 at 07:57:40PM -0700, Josh Triplett wrote:
> On Sat, Aug 17, 2013 at 07:25:15PM -0700, Paul E. McKenney wrote:
> > From: "Paul E. McKenney" 
> > 
> > There are getting to be too many module parameters to permit the current
> > semi-random order, so this patch orders them.
> > 
> > Signed-off-by: Paul E. McKenney 
> 
> As long as you're reordering them anyway, how about grouping each of the
> variables together with the corresponding module parameter macros, and
> then dropping the comments that duplicate the module parameter
> documentation?
> 
> With that change:
> Reviewed-by: Josh Triplett 

Good point, done!

Thanx, Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH tip/core/rcu 3/5] rcu: Sort rcutorture module parameters

2013-08-17 Thread Josh Triplett
On Sat, Aug 17, 2013 at 07:25:15PM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" 
> 
> There are getting to be too many module parameters to permit the current
> semi-random order, so this patch orders them.
> 
> Signed-off-by: Paul E. McKenney 

As long as you're reordering them anyway, how about grouping each of the
variables together with the corresponding module parameter macros, and
then dropping the comments that duplicate the module parameter
documentation?

With that change:
Reviewed-by: Josh Triplett 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH tip/core/rcu 3/5] rcu: Sort rcutorture module parameters

2013-08-17 Thread Paul E. McKenney
From: "Paul E. McKenney" 

There are getting to be too many module parameters to permit the current
semi-random order, so this patch orders them.

Signed-off-by: Paul E. McKenney 
---
 kernel/rcutorture.c | 68 ++---
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index be38d4e..be50ebe 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -52,81 +52,81 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Paul E. McKenney  and Josh Triplett 
");
 
-static int nreaders = -1;  /* # reader threads, defaults to 2*ncpus */
-static int nfakewriters = 4;   /* # fake writer threads */
-static int stat_interval = 60; /* Interval between stats, in seconds. */
-   /*  Zero means "only at end of test". */
-static bool verbose;   /* Print more debug info. */
-static bool test_no_idle_hz = true;
-   /* Test RCU support for tickless idle CPUs. */
-static int shuffle_interval = 3; /* Interval between shuffles (in sec)*/
-static int stutter = 5;/* Start/stop testing interval (in sec) 
*/
-static int irqreader = 1;  /* RCU readers from irq (timers). */
 static int fqs_duration;   /* Duration of bursts (us), 0 to disable. */
 static int fqs_holdoff;/* Hold time within burst (us). */
 static int fqs_stutter = 3;/* Wait time between bursts (s). */
 static bool gp_exp;/* Use expedited GP wait primitives. */
 static bool gp_normal; /* Use normal GP wait primitives. */
+static int irqreader = 1;  /* RCU readers from irq (timers). */
 static int n_barrier_cbs;  /* Number of callbacks to test RCU barriers. */
+static int nfakewriters = 4;   /* # fake writer threads */
+static int nreaders = -1;  /* # reader threads, defaults to 2*ncpus */
 static int object_debug;   /* Test object-debug double call_rcu()?. */
-static int onoff_interval; /* Wait time between CPU hotplugs, 0=disable. */
 static int onoff_holdoff;  /* Seconds after boot before CPU hotplugs. */
+static int onoff_interval; /* Wait time between CPU hotplugs, 0=disable. */
+static int shuffle_interval = 3; /* Interval between shuffles (in sec)*/
 static int shutdown_secs;  /* Shutdown time (s).  <=0 for no shutdown. */
 static int stall_cpu;  /* CPU-stall duration (s).  0 for no stall. */
 static int stall_cpu_holdoff = 10; /* Time to wait until stall (s).  */
+static int stat_interval = 60; /* Interval between stats, in seconds. */
+   /*  Zero means "only at end of test". */
+static int stutter = 5;/* Start/stop testing interval (in sec) 
*/
 static int test_boost = 1; /* Test RCU prio boost: 0=no, 1=maybe, 2=yes. */
-static int test_boost_interval = 7; /* Interval between boost tests, seconds. 
*/
 static int test_boost_duration = 4; /* Duration of each boost test, seconds. */
+static int test_boost_interval = 7; /* Interval between boost tests, seconds. 
*/
+static bool test_no_idle_hz = true;
+   /* Test RCU support for tickless idle CPUs. */
 static char *torture_type = "rcu"; /* What RCU implementation to torture. */
+static bool verbose;   /* Print more debug info. */
 
-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(gp_normal, bool, 0444);
-MODULE_PARM_DESC(gp_normal, "Use normal (non-expedited) GP wait primitives");
 module_param(gp_exp, bool, 0444);
 MODULE_PARM_DESC(gp_exp, "Use expedited GP wait primitives");
+module_param(gp_normal, bool, 0444);
+MODULE_PARM_DESC(gp_normal, "Use normal (non-expedited) GP wait primitives");
+module_param(irqreader, int, 0444);
+MODULE_PARM_DESC(irqreader, "Allow RCU readers from irq handlers");
 module_param(n_barrier_cbs, int, 0444);