From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932338AbbJMLDF (ORCPT ); Tue, 13 Oct 2015 07:03:05 -0400 Received: from mail.skyhub.de ([78.46.96.112]:35215 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752175AbbJMLDC (ORCPT ); Tue, 13 Oct 2015 07:03:02 -0400 Date: Tue, 13 Oct 2015 12:43:09 +0200 From: Borislav Petkov To: Thomas Gleixner Cc: Andi Kleen , tony.luck@intel.com, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] x86: Fix thermal throttling reporting after kexec Message-ID: <20151013104308.GC20700@pd.tnic> References: <1444681922-8644-1-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2015 at 10:33:53PM +0200, Thomas Gleixner wrote: > On Mon, 12 Oct 2015, Andi Kleen wrote: > > From: Andi Kleen > > > > 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 > > Reviewed-by: Thomas Gleixner Applied, thanks! -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.