linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: paulmck@kernel.org
To: rcu@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
	mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
	rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
	fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
	"Paul E. McKenney" <paulmck@kernel.org>
Subject: [PATCH tip/core/rcu 03/18] rcutorture: Refrain from callback flooding during boot
Date: Fri, 14 Feb 2020 16:36:56 -0800	[thread overview]
Message-ID: <20200215003711.16463-3-paulmck@kernel.org> (raw)
In-Reply-To: <20200215003634.GA16227@paulmck-ThinkPad-P72>

From: "Paul E. McKenney" <paulmck@kernel.org>

Additional rcutorture aggression can result in, believe it or not,
boot times in excess of three minutes on large hyperthreaded systems.
This is long enough for rcutorture to decide to do some callback flooding,
which seems a bit excessive given that userspace cannot have started
until long after boot, and it is userspace that does the real-world
callback flooding.  Worse yet, because Tiny RCU lacks forward-progress
functionality, the looping-in-the-kernel tests can also be problematic
during early boot.

This commit therefore causes rcutorture to hold off on callback
flooding until about the time that init is spawned, and the same
for looping-in-the-kernel tests for Tiny RCU.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/rcu/rcutorture.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 9ba4978..08fa4ef 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1994,8 +1994,11 @@ static int rcu_torture_fwd_prog(void *args)
 		schedule_timeout_interruptible(fwd_progress_holdoff * HZ);
 		WRITE_ONCE(rcu_fwd_emergency_stop, false);
 		register_oom_notifier(&rcutorture_oom_nb);
-		rcu_torture_fwd_prog_nr(rfp, &tested, &tested_tries);
-		rcu_torture_fwd_prog_cr(rfp);
+		if (!IS_ENABLED(CONFIG_TINY_RCU) ||
+		    rcu_inkernel_boot_has_ended())
+			rcu_torture_fwd_prog_nr(rfp, &tested, &tested_tries);
+		if (rcu_inkernel_boot_has_ended())
+			rcu_torture_fwd_prog_cr(rfp);
 		unregister_oom_notifier(&rcutorture_oom_nb);
 
 		/* Avoid slow periods, better to test when busy. */
-- 
2.9.5


  parent reply	other threads:[~2020-02-15  0:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15  0:36 [PATCH tip/core/rcu 0/18] Torture-test updates for v5.7 Paul E. McKenney
2020-02-15  0:36 ` [PATCH tip/core/rcu 01/18] rcutorture: Suppress forward-progress complaints during early boot paulmck
2020-02-15  0:36 ` [PATCH tip/core/rcu 02/18] torture: Make results-directory date format completion-friendly paulmck
2020-02-15  0:36 ` paulmck [this message]
2020-02-15  0:36 ` [PATCH tip/core/rcu 04/18] torture: Forgive -EBUSY from boottime CPU-hotplug operations paulmck
2020-02-15  0:36 ` [PATCH tip/core/rcu 05/18] rcutorture: Allow boottime stall warnings to be suppressed paulmck
2020-02-15  0:36 ` [PATCH tip/core/rcu 06/18] rcutorture: Suppress boottime bad-sequence warnings paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 07/18] torture: Allow disabling of boottime CPU-hotplug torture operations paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 08/18] rcutorture: Add 100-CPU configuration paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 09/18] rcutorture: Summarize summary of build and run results paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 10/18] rcutorture: Make kvm-find-errors.sh abort on bad directory paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 11/18] rcutorture: Fix rcu_torture_one_read()/rcu_torture_writer() data race paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 12/18] rcutorture: Fix stray access to rcu_fwd_cb_nodelay paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 13/18] rcutorture: Add READ_ONCE() to rcu_torture_count and rcu_torture_batch paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 14/18] rcutorture: Annotation lockless accesses to rcu_torture_current paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 15/18] rcuperf: Measure memory footprint during kfree_rcu() test paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 16/18] rcutorture: Make rcu_torture_barrier_cbs() post from corresponding CPU paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 17/18] rcutorture: Manually clean up after rcu_barrier() failure paulmck
2020-02-15  0:41 ` [PATCH tip/core/rcu 18/18] rcutorture: Set KCSAN Kconfig options to detect more data races paulmck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200215003711.16463-3-paulmck@kernel.org \
    --to=paulmck@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).