]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/rcu/rcuperf.c
Merge tag 'mtd/for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
[linux.git] / kernel / rcu / rcuperf.c
index 7a6890b23c5f545134607ed8897b841b841ee3bd..5a879d073c1c09f732380254655a39095a9643eb 100644 (file)
@@ -89,7 +89,7 @@ torture_param(int, writer_holdoff, 0, "Holdoff (us) between GPs, zero to disable
 
 static char *perf_type = "rcu";
 module_param(perf_type, charp, 0444);
-MODULE_PARM_DESC(perf_type, "Type of RCU to performance-test (rcu, rcu_bh, ...)");
+MODULE_PARM_DESC(perf_type, "Type of RCU to performance-test (rcu, srcu, ...)");
 
 static int nrealreaders;
 static int nrealwriters;
@@ -375,6 +375,14 @@ rcu_perf_writer(void *arg)
        if (holdoff)
                schedule_timeout_uninterruptible(holdoff * HZ);
 
+       /*
+        * Wait until rcu_end_inkernel_boot() is called for normal GP tests
+        * so that RCU is not always expedited for normal GP tests.
+        * The system_state test is approximate, but works well in practice.
+        */
+       while (!gp_exp && system_state != SYSTEM_RUNNING)
+               schedule_timeout_uninterruptible(1);
+
        t = ktime_get_mono_fast_ns();
        if (atomic_inc_return(&n_rcu_perf_writer_started) >= nrealwriters) {
                t_rcu_perf_writer_started = t;