From: "tip-bot2 for Dongli Zhang" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Dongli Zhang <dongli.zhang@oracle.com>,
Thomas Gleixner <tglx@linutronix.de>,
Qais Yousef <qais.yousef@arm.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: smp/core] cpu/hotplug: Add debug printks for hotplug callback failures
Date: Tue, 10 Aug 2021 16:33:06 -0000 [thread overview]
Message-ID: <162861318629.395.16160423295474407641.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20210409055316.1709-1-dongli.zhang@oracle.com>
The following commit has been merged into the smp/core branch of tip:
Commit-ID: ebca71a8c96f0af2ba482489ecc64d88979cd825
Gitweb: https://git.kernel.org/tip/ebca71a8c96f0af2ba482489ecc64d88979cd825
Author: Dongli Zhang <dongli.zhang@oracle.com>
AuthorDate: Thu, 08 Apr 2021 22:53:16 -07:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 10 Aug 2021 18:31:32 +02:00
cpu/hotplug: Add debug printks for hotplug callback failures
CPU hotplug callbacks can fail and cause a rollback to the previous
state. These failures are silent and therefore hard to debug.
Add pr_debug() to the up and down paths which provide information about the
error code, the CPU and the failed state. The debug printks can be enabled
via kernel command line or sysfs.
[ tglx: Adopt to current mainline, massage printk and changelog ]
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Qais Yousef <qais.yousef@arm.com>
Link: https://lore.kernel.org/r/20210409055316.1709-1-dongli.zhang@oracle.com
---
kernel/cpu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 7ef28e1..192e43a 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -692,6 +692,10 @@ static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
ret = cpuhp_invoke_callback_range(true, cpu, st, target);
if (ret) {
+ pr_debug("CPU UP failed (%d) CPU %u state %s (%d)\n",
+ ret, cpu, cpuhp_get_step(st->state)->name,
+ st->state);
+
cpuhp_reset_state(st, prev_state);
if (can_rollback_cpu(st))
WARN_ON(cpuhp_invoke_callback_range(false, cpu, st,
@@ -1091,6 +1095,9 @@ static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
ret = cpuhp_invoke_callback_range(false, cpu, st, target);
if (ret) {
+ pr_debug("CPU DOWN failed (%d) CPU %u state %s (%d)\n",
+ ret, cpu, cpuhp_get_step(st->state)->name,
+ st->state);
cpuhp_reset_state(st, prev_state);
prev parent reply other threads:[~2021-08-10 16:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 5:53 [PATCH v2 1/1] kernel/cpu: to track which CPUHP callback is failed Dongli Zhang
2021-04-13 11:58 ` Qais Yousef
2021-08-10 16:33 ` tip-bot2 for Dongli Zhang [this message]
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=162861318629.395.16160423295474407641.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=dongli.zhang@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=qais.yousef@arm.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®