Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932959AbdCGQI3 (ORCPT ); Tue, 7 Mar 2017 11:08:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45124 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932922AbdCGQHz (ORCPT ); Tue, 7 Mar 2017 11:07:55 -0500 Date: Tue, 7 Mar 2017 11:07:48 -0500 From: Don Zickus To: Mike Travis Cc: Ingo Molnar , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Peter Zijlstra , Dimitri Sivanich , Frank Ramsay , Russ Anderson , Tony Ernst , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] x86/platform: Add a low priority low frequency NMI call chain Message-ID: <20170307160748.z4dl7wdqusiybjda@redhat.com> References: <20170306181737.059578494@asylum.americas.sgi.com> <20170306181737.322206440@asylum.americas.sgi.com> <20170307074210.GA24782@gmail.com> <20170307152206.4nqqrekwmfqbdn7b@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 07 Mar 2017 16:07:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2700 Lines: 68 On Tue, Mar 07, 2017 at 08:00:33AM -0800, Mike Travis wrote: > > > On 3/7/2017 7:22 AM, Don Zickus wrote: > > On Tue, Mar 07, 2017 at 08:42:10AM +0100, Ingo Molnar wrote: > >> > >> * Mike Travis wrote: > >> > >>> Add a new NMI call chain that is called last after all other NMI handlers > >>> have been checked and did not "handle" the NMI. This mimics the current > >>> NMI_UNKNOWN call chain except it eliminates the WARNING message about > >>> multiple NMI handlers registering on this call chain. > >>> > >>> This call chain dramatically lowers the NMI call frequency when high > >>> frequency NMI tools are in use, notably the perf tools. It is required > >>> for NMI handlers that cannot sustain a high NMI call rate without > >>> ramifications to the system operability. > >> > >> So how about we just turn off that warning instead? I don't remember the last time > >> it actually _helped_ us find any kernel or hardware bug - and it has caused tons > >> of problems... > > > > Yeah, that is one way to solve it. :-) > > Actually just removing the WARNING indication and making it an > INFO message would be enough to quiet objections. Is that enough, That might be useful to at least log in, but as Ingo said it just might be overkill in the real world. > or should the message be completely removed for UNKNOWN NMI > handlers, and left in place for IO_CHECK and SERR NMI handlers? > > > > > Originally I put that in there because the unknown nmi handlers sometime do > > not return, making it impossible for the second handler to run. > > The only two external unknown NMI handlers that I know of is the UV > one and the KGDB one. The KGDB one appears to be only claimed if it > is exiting an NMI_LOCAL event. And the UV one is only claimed if > it as caused by a UV System NMI event. So truly unknown NMI events > eventually get to the internal unknown nmi handler. Good to know. I keep thinking of the hpwdt that wants to eat all NMIs, I believe that still registers on the unknown nmi (drivers/watchdog/hpwdt.c). Cheers, Don > > > But you are right, it probably hasn't really helped find any problems. I > > wasn't aware of problems it was causing (not that I was looking through > > emails to find them either). > > > > Cheers, > > Don > > > >> > >> It's not like we warn about excess regular IRQs either - we either handle them or > >> at most increase a counter somewhere. We could do the same for NMIs: introduce a > >> counter somewhere that counts the number of seemingly unhandled NMIs. > >> > >> But in any case, we should not spam the kernel log, neither with high, nor with > >> low frequency. > >> > >> Thanks, > >> > >> Ingo