From: Andi Kleen <andi@firstfloor.org>
To: tony.luck@intel.com
Cc: bp@alien8.de, tglx@linutronix.de, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH] x86: Fix thermal throttling reporting after kexec
Date: Mon, 12 Oct 2015 13:32:02 -0700 [thread overview]
Message-ID: <1444681922-8644-1-git-send-email-andi@firstfloor.org> (raw)
From: Andi Kleen <ak@linux.intel.com>
The per CPU thermal vector init code checks if the thermal
vector is already installed and complains and bails out if
it is.
This happens after kexec, as kernel shut down does
not clear the thermal vector APIC register.
This causes two problems:
So we always do not fully initialize thermal reports
after kexec. The CPU is still likely initialized,
as the previous kernel should have done it. But
we don't set up the software pointer to the thermal
vector, so reporting may end up with a unknown thermal
interrupt message.
Also it complains for every logical CPU, even though the
value is actually derived from BP only.
The problem is that we end up with one message per CPU,
so on larger systems it becomes very noisy and messes up
the otherwise nicely formatted CPU bootup numbers in
the kernel log.
Just remove the check. I checked the code and there's
no valid code paths where the thermal init code for a CPU
could be called multiple times.
Why the kernel does not clean up this value on shutdown:
The thermal monitoring is controlled per logical CPU thread.
Normal shutdown code is just running on one CPU.
To disable it we would need a broadcast NMI to all CPUs
on shut down. That's overkill for this. So we just
ignore it after kexec.
v2: Updated commit log to discuss why the value is not
cleaned up on shutdown.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
arch/x86/kernel/cpu/mcheck/therm_throt.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 1af51b1..2c5aaf8 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -503,14 +503,6 @@ void intel_init_thermal(struct cpuinfo_x86 *c)
return;
}
- /* Check whether a vector already exists */
- if (h & APIC_VECTOR_MASK) {
- printk(KERN_DEBUG
- "CPU%d: Thermal LVT vector (%#x) already installed\n",
- cpu, (h & APIC_VECTOR_MASK));
- return;
- }
-
/* early Pentium M models use different method for enabling TM2 */
if (cpu_has(c, X86_FEATURE_TM2)) {
if (c->x86 == 6 && (c->x86_model == 9 || c->x86_model == 13)) {
--
2.4.3
next reply other threads:[~2015-10-12 20:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 20:32 Andi Kleen [this message]
2015-10-12 20:33 ` Thomas Gleixner
2015-10-13 10:43 ` Borislav Petkov
-- strict thread matches above, loose matches on Subject: below --
2015-09-24 20:10 Andi Kleen
2015-10-01 12:15 ` Thomas Gleixner
2015-10-01 17:27 ` Andi Kleen
2015-10-01 21:41 ` Thomas Gleixner
2015-10-01 21:50 ` Andi Kleen
2015-10-01 22:04 ` Andi Kleen
2015-10-02 20:33 ` Thomas Gleixner
2015-10-11 19:37 ` Thomas Gleixner
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=1444681922-8644-1-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
/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
Powered by JetHome