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 04/18] torture: Forgive -EBUSY from boottime CPU-hotplug operations
Date: Fri, 14 Feb 2020 16:36:57 -0800 [thread overview]
Message-ID: <20200215003711.16463-4-paulmck@kernel.org> (raw)
In-Reply-To: <20200215003634.GA16227@paulmck-ThinkPad-P72>
From: "Paul E. McKenney" <paulmck@kernel.org>
During boot, CPU hotplug is often disabled, for example by PCI probing.
On large systems that take substantial time to boot, this can result
in spurious RCU_HOTPLUG errors. This commit therefore forgives any
boottime -EBUSY CPU-hotplug failures by adjusting counters to pretend
that the corresponding attempt never happened. A non-splat record
of the failed attempt is emitted to the console with the added string
"(-EBUSY forgiven during boot)".
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
kernel/torture.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/kernel/torture.c b/kernel/torture.c
index 7c13f55..e377b5b 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -84,6 +84,7 @@ bool torture_offline(int cpu, long *n_offl_attempts, long *n_offl_successes,
{
unsigned long delta;
int ret;
+ char *s;
unsigned long starttime;
if (!cpu_online(cpu) || !cpu_is_hotpluggable(cpu))
@@ -99,10 +100,16 @@ bool torture_offline(int cpu, long *n_offl_attempts, long *n_offl_successes,
(*n_offl_attempts)++;
ret = cpu_down(cpu);
if (ret) {
+ s = "";
+ if (!rcu_inkernel_boot_has_ended() && ret == -EBUSY) {
+ // PCI probe frequently disables hotplug during boot.
+ (*n_offl_attempts)--;
+ s = " (-EBUSY forgiven during boot)";
+ }
if (verbose)
pr_alert("%s" TORTURE_FLAG
- "torture_onoff task: offline %d failed: errno %d\n",
- torture_type, cpu, ret);
+ "torture_onoff task: offline %d failed%s: errno %d\n",
+ torture_type, cpu, s, ret);
} else {
if (verbose > 1)
pr_alert("%s" TORTURE_FLAG
@@ -137,6 +144,7 @@ bool torture_online(int cpu, long *n_onl_attempts, long *n_onl_successes,
{
unsigned long delta;
int ret;
+ char *s;
unsigned long starttime;
if (cpu_online(cpu) || !cpu_is_hotpluggable(cpu))
@@ -150,10 +158,16 @@ bool torture_online(int cpu, long *n_onl_attempts, long *n_onl_successes,
(*n_onl_attempts)++;
ret = cpu_up(cpu);
if (ret) {
+ s = "";
+ if (!rcu_inkernel_boot_has_ended() && ret == -EBUSY) {
+ // PCI probe frequently disables hotplug during boot.
+ (*n_onl_attempts)--;
+ s = " (-EBUSY forgiven during boot)";
+ }
if (verbose)
pr_alert("%s" TORTURE_FLAG
- "torture_onoff task: online %d failed: errno %d\n",
- torture_type, cpu, ret);
+ "torture_onoff task: online %d failed%s: errno %d\n",
+ torture_type, cpu, s, ret);
} else {
if (verbose > 1)
pr_alert("%s" TORTURE_FLAG
--
2.9.5
next prev 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 ` [PATCH tip/core/rcu 03/18] rcutorture: Refrain from callback flooding during boot paulmck
2020-02-15 0:36 ` paulmck [this message]
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-4-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).