All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Johannes Stezenbach" <js@sig21.net>,
	linux-kernel@vger.kernel.org,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Thomas Gleixner" <tglx@linutronix.de>
Subject: Re: [patch] cache-miss and cache-refs events on P6-mobile CPUs
Date: Tue, 11 Aug 2009 13:21:57 +0200	[thread overview]
Message-ID: <1249989717.17467.159.camel@twins> (raw)
In-Reply-To: <20090811110627.GA31136@elte.hu>

On Tue, 2009-08-11 at 13:06 +0200, Ingo Molnar wrote:
> * Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> 
> > On Tue, 2009-08-11 at 11:34 +0200, Ingo Molnar wrote:
> > 
> > > @@ -116,8 +116,8 @@ static const u64 p6_perfmon_event_map[] 
> > >  {
> > >    [PERF_COUNT_HW_CPU_CYCLES]		= 0x0079,
> > >    [PERF_COUNT_HW_INSTRUCTIONS]		= 0x00c0,
> > > -  [PERF_COUNT_HW_CACHE_REFERENCES]	= 0x0000,
> > > -  [PERF_COUNT_HW_CACHE_MISSES]		= 0x0000,
> > > +  [PERF_COUNT_HW_CACHE_REFERENCES]	= 0x0f2e,
> > > +  [PERF_COUNT_HW_CACHE_MISSES]		= 0x012e,
> > 
> > 2e is total numer of L2 events,
> > 
> > 0f is all mesi states
> > 01 is invalid states
> 
> here's Intel's own description:
> 
>  I_STATE 0x01 Counts how many times requests miss the cache.
>  MESI    0x0F Counts how many times cache lines in any state are accessed.
> 
> so it's pretty close in practice. The only counts that are a bit 
> inapplicable are fetches/prefetches it initiates on its own (they 
> are included here) - but those too are related to the workload in 
> general, so it's good as an approximation.
> 
> It's definitely better than 0x00 IMO. What do you think?

Well, if they say so. I was thinking that counting I states would count
invalidates due to remote S->{E,M} transitions and invpg ins' and such. 

And hitting an invalidated line is a whole different thing than plain
missing it due to it not being present.

Anyway, if this is the Intel recommended thing for cache misses, who am
I to argue.


  reply	other threads:[~2009-08-11 12:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07 17:09 2.6.31-rc5 regression: x86 MCE malfunction on Thinkpad T42p Johannes Stezenbach
2009-08-09 10:03 ` Johannes Stezenbach
2009-08-09 10:34   ` Bartlomiej Zolnierkiewicz
2009-08-09 16:47     ` Johannes Stezenbach
2009-08-10 10:31 ` Andi Kleen
2009-08-10 12:27   ` Johannes Stezenbach
2009-08-10 12:32     ` Andi Kleen
2009-08-10 12:56       ` Johannes Stezenbach
2009-08-10 13:29         ` Ingo Molnar
2009-08-10 19:26           ` Johannes Stezenbach
2009-08-10 19:44             ` Andi Kleen
2009-08-10 20:05               ` Robert Richter
2009-08-10 20:14             ` Ingo Molnar
2009-08-10 20:37               ` Johannes Stezenbach
2009-08-10 21:31                 ` Ingo Molnar
2009-08-10 22:13                   ` Johannes Stezenbach
2009-08-11  9:34                     ` [patch] cache-miss and cache-refs events on P6-mobile CPUs Ingo Molnar
2009-08-11  9:39                       ` Peter Zijlstra
2009-08-11 11:06                         ` Ingo Molnar
2009-08-11 11:21                           ` Peter Zijlstra [this message]
2009-08-11 15:50                       ` Johannes Stezenbach
2009-08-11 16:56                         ` Ingo Molnar
2009-08-11 15:40                     ` 2.6.31-rc5 regression: x86 MCE malfunction on Thinkpad T42p Johannes Stezenbach
2009-08-17 14:49                       ` Steven Rostedt
2009-08-12 11:59   ` *PING* [PATCH]: x86: mce: fix mce warning with disabled lapic Ingo Molnar

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=1249989717.17467.159.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=fweisbec@gmail.com \
    --cc=js@sig21.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.