]> www.infradead.org Git - linux.git/commitdiff
torture: Eliminate torture_runnable and perf_runnable
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 22 Nov 2017 04:19:17 +0000 (20:19 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 11 Dec 2017 17:18:29 +0000 (09:18 -0800)
The purpose of torture_runnable is to allow rcutorture and locktorture
to be started and stopped via sysfs when they are built into the kernel
(as in not compiled as loadable modules).  However, the 0444 permissions
for both instances of torture_runnable prevent this use case from ever
being put into practice.  Given that there have been no complaints
about this deficiency, it is reasonable to conclude that no one actually
makes use of this sysfs capability.  The perf_runnable module parameter
for rcuperf is in the same situation.

This commit therefore removes both torture_runnable instances as well
as perf_runnable.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Documentation/admin-guide/kernel-parameters.txt
Documentation/locking/locktorture.txt
include/linux/torture.h
kernel/locking/locktorture.c
kernel/rcu/rcuperf.c
kernel/rcu/rcutorture.c
kernel/torture.c
tools/testing/selftests/rcutorture/configs/lock/ver_functions.sh
tools/testing/selftests/rcutorture/configs/rcu/ver_functions.sh
tools/testing/selftests/rcutorture/configs/rcuperf/ver_functions.sh

index 6571fbfdb2a1527c25b3a01e9c4228c84adce639..66d471f0b92eb6ae4a2d644a69613824fdfeffaa 100644 (file)
                        This tests the locking primitive's ability to
                        transition abruptly to and from idle.
 
-       locktorture.torture_runnable= [BOOT]
-                       Start locktorture running at boot time.
-
        locktorture.torture_type= [KNL]
                        Specify the locking implementation to test.
 
                        the same as for rcuperf.nreaders.
                        N, where N is the number of CPUs
 
-       rcuperf.perf_runnable= [BOOT]
-                       Start rcuperf running at boot time.
-
        rcuperf.perf_type= [KNL]
                        Specify the RCU implementation to test.
 
                        Test RCU's dyntick-idle handling.  See also the
                        rcutorture.shuffle_interval parameter.
 
-       rcutorture.torture_runnable= [BOOT]
-                       Start rcutorture running at boot time.
-
        rcutorture.torture_type= [KNL]
                        Specify the RCU implementation to test.
 
index a2ef3a929bf189bb43f7425f8e5e8a5564d23833..6a8df4cd19bfdbf908932fae8fa478c8cb859b15 100644 (file)
@@ -57,11 +57,6 @@ torture_type   Type of lock to torture. By default, only spinlocks will
 
                     o "rwsem_lock": read/write down() and up() semaphore pairs.
 
-torture_runnable  Start locktorture at boot time in the case where the
-                 module is built into the kernel, otherwise wait for
-                 torture_runnable to be set via sysfs before starting.
-                 By default it will begin once the module is loaded.
-
 
            ** Torture-framework (RCU + locking) **
 
index 907d266aaddc121d30e021fd09ebed80548585e7..66272862070b1c7610e8f8587ccb38fa627076a4 100644 (file)
@@ -79,7 +79,7 @@ void stutter_wait(const char *title);
 int torture_stutter_init(int s);
 
 /* Initialization and cleanup. */
-bool torture_init_begin(char *ttype, bool v, int *runnable);
+bool torture_init_begin(char *ttype, bool v);
 void torture_init_end(void);
 bool torture_cleanup_begin(void);
 void torture_cleanup_end(void);
index 2a1fc2a58910e210ec73c1d046cea621efc181a1..6850ffd6912579ac6053a6bdcc22f3322acab261 100644 (file)
@@ -77,10 +77,6 @@ struct lock_stress_stats {
        long n_lock_acquired;
 };
 
-int torture_runnable = IS_ENABLED(MODULE);
-module_param(torture_runnable, int, 0444);
-MODULE_PARM_DESC(torture_runnable, "Start locktorture at module init");
-
 /* Forward reference. */
 static void lock_torture_cleanup(void);
 
@@ -866,7 +862,7 @@ static int __init lock_torture_init(void)
                &percpu_rwsem_lock_ops,
        };
 
-       if (!torture_init_begin(torture_type, verbose, &torture_runnable))
+       if (!torture_init_begin(torture_type, verbose))
                return -EBUSY;
 
        /* Process args and tell the world that the torturer is on the job. */
index 1f87a02c33999087ad0504b9c42c63b2d3fd5d2e..d1ebdf9868bb34da238731cbfe9ca516024fd906 100644 (file)
@@ -106,10 +106,6 @@ static int rcu_perf_writer_state;
 #define MAX_MEAS 10000
 #define MIN_MEAS 100
 
-static int perf_runnable = IS_ENABLED(MODULE);
-module_param(perf_runnable, int, 0444);
-MODULE_PARM_DESC(perf_runnable, "Start rcuperf at boot");
-
 /*
  * Operations vector for selecting different types of tests.
  */
@@ -646,7 +642,7 @@ rcu_perf_init(void)
                &tasks_ops,
        };
 
-       if (!torture_init_begin(perf_type, verbose, &perf_runnable))
+       if (!torture_init_begin(perf_type, verbose))
                return -EBUSY;
 
        /* Process args and tell the world that the perf'er is on the job. */
index 1074ecc3f72f16f4e2485e5a848db1a618c837f2..308e6fdbced8450512cde14e0a45e70833440de4 100644 (file)
@@ -187,10 +187,6 @@ static const char *rcu_torture_writer_state_getname(void)
        return rcu_torture_writer_state_names[i];
 }
 
-static int torture_runnable = IS_ENABLED(MODULE);
-module_param(torture_runnable, int, 0444);
-MODULE_PARM_DESC(torture_runnable, "Start rcutorture at boot");
-
 #if defined(CONFIG_RCU_BOOST) && !defined(CONFIG_HOTPLUG_CPU)
 #define rcu_can_boost() 1
 #else /* #if defined(CONFIG_RCU_BOOST) && !defined(CONFIG_HOTPLUG_CPU) */
@@ -1729,7 +1725,7 @@ rcu_torture_init(void)
                &sched_ops, &tasks_ops,
        };
 
-       if (!torture_init_begin(torture_type, verbose, &torture_runnable))
+       if (!torture_init_begin(torture_type, verbose))
                return -EBUSY;
 
        /* Process args and tell the world that the torturer is on the job. */
index 3bcbd4fbfe180953735800394fa2cc544ac6181a..572576ad9f58c2b6794f59e04c632797e6fbbedc 100644 (file)
@@ -61,7 +61,6 @@ static bool verbose;
 #define FULLSTOP_RMMOD    2    /* Normal rmmod of torture. */
 static int fullstop = FULLSTOP_RMMOD;
 static DEFINE_MUTEX(fullstop_mutex);
-static int *torture_runnable;
 
 #ifdef CONFIG_HOTPLUG_CPU
 
@@ -577,7 +576,7 @@ void stutter_wait(const char *title)
 
        cond_resched_rcu_qs();
        spt = READ_ONCE(stutter_pause_test);
-       while (spt || (torture_runnable && !READ_ONCE(*torture_runnable))) {
+       while (spt) {
                if (spt == 1) {
                        schedule_timeout_interruptible(1);
                } else if (spt == 2) {
@@ -649,7 +648,7 @@ static void torture_stutter_cleanup(void)
  * The runnable parameter points to a flag that controls whether or not
  * the test is currently runnable.  If there is no such flag, pass in NULL.
  */
-bool torture_init_begin(char *ttype, bool v, int *runnable)
+bool torture_init_begin(char *ttype, bool v)
 {
        mutex_lock(&fullstop_mutex);
        if (torture_type != NULL) {
@@ -661,7 +660,6 @@ bool torture_init_begin(char *ttype, bool v, int *runnable)
        }
        torture_type = ttype;
        verbose = v;
-       torture_runnable = runnable;
        fullstop = FULLSTOP_DONTSTOP;
        return true;
 }
index 252aae618984ff622685bda02b9ac11c787d1533..80eb646e13199c84ce943986263798138b9c88e0 100644 (file)
@@ -38,6 +38,5 @@ per_version_boot_params () {
        echo $1 `locktorture_param_onoff "$1" "$2"` \
                locktorture.stat_interval=15 \
                locktorture.shutdown_secs=$3 \
-               locktorture.torture_runnable=1 \
                locktorture.verbose=1
 }
index ffb85ed786fac90e86c304d64a15918c6988dd0a..24ec910419576879ed48a75e448cebc57c13aece 100644 (file)
@@ -51,7 +51,6 @@ per_version_boot_params () {
                `rcutorture_param_n_barrier_cbs "$1"` \
                rcutorture.stat_interval=15 \
                rcutorture.shutdown_secs=$3 \
-               rcutorture.torture_runnable=1 \
                rcutorture.test_no_idle_hz=1 \
                rcutorture.verbose=1
 }
index 34f2a1b35ee5e8ecebb9b5c7e079fc30c0d1ab10..b9603115d7c7fd71164aeea06ba4e2a05e5c1c86 100644 (file)
@@ -46,7 +46,6 @@ rcuperf_param_nwriters () {
 per_version_boot_params () {
        echo $1 `rcuperf_param_nreaders "$1"` \
                `rcuperf_param_nwriters "$1"` \
-               rcuperf.perf_runnable=1 \
                rcuperf.shutdown=1 \
                rcuperf.verbose=1
 }