public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Robert Richter <robert.richter@amd.com>
Cc: "x86@kernel.org" <x86@kernel.org>,
	Andi Kleen <andi@firstfloor.org>,
	Peter Zijlstra <peterz@infradead.org>,
	"ying.huang@intel.com" <ying.huang@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"paulmck@linux.vnet.ibm.com" <paulmck@linux.vnet.ibm.com>
Subject: Re: [V3][PATCH 6/6] x86, nmi: print out NMI stats in /proc/interrupts
Date: Tue, 6 Sep 2011 13:40:35 -0400	[thread overview]
Message-ID: <20110906174035.GO6838@redhat.com> (raw)
In-Reply-To: <20110906163904.GJ14200@erda.amd.com>

On Tue, Sep 06, 2011 at 06:39:04PM +0200, Robert Richter wrote:
> On 25.08.11 12:45:48, Don Zickus wrote:
> > This is a cheap hack to add the stats to the middle of /proc/interrupts.
> > It is more of a conversation starter than anything as I am not sure
> > the right letters and place to put this stuff.
> > 
> > The benefit of these stats is a better breakdown of which list the NMIs
> > get handled in either a normal handler, unknown, or external.  It also
> > list the number of unknown NMIs swallowed to help check for false
> > positives or not.  Another benefit is the ability to actually see which
> > NMI handlers are currently registered in the system.
> > 
> > The output of 'cat /proc/interrupts/ will look like this:
> > 
> > <snip>
> >  58:        275          0        864          0   PCI-MSI-edge      eth0
> > NMI:       4161       4155        158       4194   Non-maskable interrupts
> > SWA:          0          0          0          0   Unknown NMIs swallowed
> >   0:       4161       4155        158       4194   NMI  PMI, arch_bt
> 
> What does the "0" stand for?

Just a place holder meaning NMI0 for the normal NMIs, but as you stated
below, it is more an event counter.  I wanted to use LOC for local but it
was already taken.

> 
> We could easily provide a statistic for each NMI handler, which would
> be more useful.

Of course, but I wasn't sure how to print that without making
/proc/interrupts look messy.  I suggested earlier to Peter that I thought
about a /proc/nmi file that could print that.

> 
> The syntax of the NMI printout is not yet perfect, so before adding it
> as a new interface I would rather wait a bit to discuss this more.
> 
> People also could get confused because the handled count may be
> different to nmi count. This should be documented more clearly, maybe
> as event count instead of nmi count or so.

That is why I put this patch last with a big blurb on top stating this
needs more feedback. :-)  The hack hook into /proc/interrupts probably
isn't reasonable either. 

Cheers,
Don

> 
> -Robert
> 
> > UNK:          0          0          0          0   NMI
> > EXT:          0          0          0          0   NMI
> > LOC:      12653      13304      13974      12926   Local timer interrupts
> > SPU:          0          0          0          0   Spurious interrupts
> > PMI:          6          6          5          6   Performance monitoring interrupts
> > IWI:          0          0          0          0   IRQ work interrupts
> > RES:       1839       1897       1821       1854   Rescheduling interrupts
> > CAL:        524       2714        392        331   Function call interrupts
> > TLB:        217        146        593        576   TLB shootdowns
> > TRM:          0          0          0          0   Thermal event interrupts
> > THR:          0          0          0          0   Threshold APIC interrupts
> > MCE:          0          0          0          0   Machine check exceptions
> > MCP:          1          1          1          1   Machine check polls
> > ERR:          0
> > MIS:          0
> 
> -- 
> Advanced Micro Devices, Inc.
> Operating System Research Center
> 

  reply	other threads:[~2011-09-06 17:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 16:45 [V3][PATCH 0/6] x86, nmi: new NMI handling routines Don Zickus
2011-08-25 16:45 ` [V3][PATCH 1/6] x86, nmi: split out nmi from traps.c Don Zickus
2011-08-25 16:45 ` [V3][PATCH 2/6] x86, nmi: create new NMI handler routines Don Zickus
2011-08-26  9:44   ` Peter Zijlstra
2011-08-26 14:21     ` Don Zickus
2011-09-06 10:08   ` Robert Richter
2011-09-06 16:53     ` Don Zickus
2011-08-25 16:45 ` [V3][PATCH 3/6] x86, nmi: wire up NMI handlers to new routines Don Zickus
2011-09-06 16:15   ` Robert Richter
2011-09-06 16:52     ` Don Zickus
2011-09-07  9:03       ` Borislav Petkov
2011-09-06 17:20   ` Corey Minyard
2011-09-06 17:49     ` Don Zickus
2011-09-06 17:59       ` Corey Minyard
2011-08-25 16:45 ` [V3][PATCH 4/6] x86, nmi: add in logic to handle multiple events and unknown NMIs Don Zickus
2011-09-06 16:18   ` Robert Richter
2011-08-25 16:45 ` [V3][PATCH 5/6] x86, nmi: track NMI usage stats Don Zickus
2011-08-25 16:45 ` [V3][PATCH 6/6] x86, nmi: print out NMI stats in /proc/interrupts Don Zickus
2011-09-06 16:39   ` Robert Richter
2011-09-06 17:40     ` Don Zickus [this message]
2011-08-26  9:44 ` [V3][PATCH 0/6] x86, nmi: new NMI handling routines Peter Zijlstra
2011-08-26 14:39   ` Don Zickus
2011-08-26 14:51     ` Peter Zijlstra
2011-09-06 16:43 ` Robert Richter

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=20110906174035.GO6838@redhat.com \
    --to=dzickus@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.com \
    --cc=x86@kernel.org \
    --cc=ying.huang@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