From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932676AbaEGQay (ORCPT ); Wed, 7 May 2014 12:30:54 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:54601 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932402AbaEGQax (ORCPT ); Wed, 7 May 2014 12:30:53 -0400 Date: Wed, 7 May 2014 18:30:47 +0200 From: Ingo Molnar To: Don Zickus Cc: x86@kernel.org, Peter Zijlstra , ak@linux.intel.com, gong.chen@linux.intel.com, LKML , Thomas Gleixner , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker Subject: Re: [PATCH 5/5] x86, nmi: Add better NMI stats to /proc/interrupts and show handlers Message-ID: <20140507163047.GB15779@gmail.com> References: <1399476883-98970-1-git-send-email-dzickus@redhat.com> <1399476883-98970-6-git-send-email-dzickus@redhat.com> <20140507154231.GB14926@gmail.com> <20140507160439.GR39568@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140507160439.GR39568@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Don Zickus wrote: > On Wed, May 07, 2014 at 05:42:31PM +0200, Ingo Molnar wrote: > > > > * Don Zickus wrote: > > > > > The main reason for this patch is because I have a hard time knowing > > > what NMI handlers are registered on the system when debugging NMI issues. > > > > > > This info is provided in /proc/interrupts for interrupt handlers, so I > > > added support for NMI stuff too. As a bonus it provides stat breakdowns > > > much like the interrupts. > > > > > > The only ugly issue is how to label NMI subtypes using only 3 letters > > > and still make it obvious it is part of the NMI. Adding a /proc/nmi > > > seemed overkill, so I choose to indent things by one space. Sample > > > output is below: > > > > > > [root@dhcp71-248 ~]# cat /proc/interrupts > > > CPU0 CPU1 CPU2 CPU3 > > > 0: 29 0 0 0 IR-IO-APIC-edge timer > > > > > > NMI: 20 774 10986 4227 Non-maskable interrupts > > > LOC: 21 775 10987 4228 Local PMI, arch_bt > > > EXT: 0 0 0 0 External plat > > > UNK: 0 0 0 0 Unknown > > > SWA: 0 0 0 0 Swallowed > > > LOC: 30374 24749 20795 15095 Local timer interrupts > > > SPU: 0 0 0 0 Spurious interrupts > > > PMI: 20 774 10986 4227 Performance monitoring interrupts > > > > > > > Looks pretty useful! > > > > The lost vertical alignment of the counts is a problem though IMHO. > > Agreed! It wasn't obvious to me at the time on how to keep that > alignment while only changing the first column. I can look at it > again, if you are ok with the small shift in the first column. > Otherwise alternate ideas are welcomed. :-) So I'd just pick a unique 3-letter shortcut for the first column and not do any shifting. Do the 'these are NMI sub-cases' distinction in the descripion field. Example mockup: NMI: 20 774 10986 4227 Non-maskable interrupts NLC: 21 775 10987 4228 NMI: Local PMI, arch_bt NXT: 0 0 0 0 NMI: External plat NUN: 0 0 0 0 NMI: Unknown NSW: 0 0 0 0 NMI: Swallowed LOC: 30374 24749 20795 15095 Local timer interrupts or so. Thanks, Ingo