From: William Cohen <wcohen@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
"David S. Miller" <davem@davemloft.net>,
Robert Richter <robert.richter@amd.com>,
Eric Dumazet <dada1@cosmosbay.com>,
Stephane Eranian <eranian@googlemail.com>,
Paul Mackerras <paulus@samba.org>, Peter Anvin <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
perfctr-devel@lists.sourceforge.net,
Arjan van de Ven <arjan@infradead.org>
Subject: Re: [Perfctr-devel] [patch] Performance Counters for Linux, v4
Date: Tue, 16 Dec 2008 14:56:02 -0500 [thread overview]
Message-ID: <494807D2.3060808@redhat.com> (raw)
In-Reply-To: <20081214212829.GA9435@elte.hu>
Ingo Molnar wrote:
> We are pleased to announce the v4 release of our performance counters
> subsystem implementation. The kernel changes can be picked up from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git perfcounters/core
>
> (also in the master branch. There's also a kernel patch attached
> below.)
PAPI also has the concept of event presets to hide some of the event
selection details. The following URL lists the presets and which
processors they are supported on:
http://icl.cs.utk.edu/projects/papi/presets.html
Looking through the PAPI preset events can see lots of variation due
to the difference in what precisely the performance monitoring
hardware support within the processor. The following events are
defined in include/linux/perf_counter.h. It would be helpful to state
what is meant by of the following events:
PERF_COUNT_CYCLES
PERF_COUNT_INSTRUCTIONS
PERF_COUNT_CACHE_REFERENCES
PERF_COUNT_CACHE_MISSES
PERF_COUNT_BRANCH_INSTRUCTIONS
PERF_COUNT_BRANCH_MISSES
PERF_COUNT_CYCLES and PERF_COUNT_INSTRUCTIONS
Is this the cpu clock rate to compute clocks per instruction (CPI)? On
some processors there are several possible sources of "cycles":
Reference clock frequency (fixed frequency, e.g. always 2.2GHz)
Cycles of processor subject to frequency changes and halts
Is PERF_COUNT_INSTRUCTIONS the instructions actually retired by the
processor and would be used with PERF_COUNT_CYCLES to estimate CPI? In
the case of a SMT (symetric multi-threaded) processor these are
going to be kept on a per-virtual-CPU basis?
PERF_COUNT_CACHE_REFERENCES and PERF_COUNT_CACHE_MISSES
PERF_COUNT_CACHE_REFERENCES and PERF_COUNT_CACHE_MISSES are not single
monolitic events on many processors. There are multiple cache
levels. The L1 cache most processors have separate instruction and
data caches and require multiple counters to implement. Would these
refer to the last level of cache before memory and just be used to
compute the hit/miss rate for that last level? Some processors in the
same family have L2 and some processors have L3 cache. The setup code
would need to distinguish between these processor variants.
What memory references and misses are included and excluded in cache operation
counts? TLB accesses? Cache eviction/snooping operations?
PERF_COUNT_BRANCH_INSTRUCTIONS and PERF_COUNT_BRANCH_MISSES
Assume the PERF_COUNT_BRANCH_INSTRUCTIONS and PERF_COUNT_BRANCH_MISSES
refer only to retired instructions are are used to compute branch
misprediction ratio. Speculative instructions don't count for these numbers.
Any thought to including events that are not in the Intel architected events
such as ITLB/DTLB accesses and misses?
-Will
next prev parent reply other threads:[~2008-12-16 19:57 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-14 21:28 [patch] Performance Counters for Linux, v4 Ingo Molnar
2008-12-15 11:59 ` Paul Mackerras
2008-12-15 12:11 ` Paul Mackerras
2008-12-16 14:22 ` Peter Zijlstra
2008-12-16 23:06 ` Paul Mackerras
2008-12-16 23:51 ` Ingo Molnar
2008-12-17 1:55 ` Andi Kleen
2009-01-16 18:01 ` Corey Ashford
2009-01-16 22:14 ` Maynard Johnson
2009-01-16 23:11 ` Ingo Molnar
2009-01-17 1:26 ` Paul Mackerras
2009-01-17 9:53 ` Andi Kleen
2008-12-17 2:23 ` [Perfctr-devel] " Dan Terpstra
2008-12-17 7:34 ` stephane eranian
2008-12-15 17:44 ` Vince Weaver
2008-12-15 21:07 ` Vince Weaver
2008-12-15 22:13 ` Paul Mackerras
2008-12-15 21:42 ` Paul Mackerras
2008-12-15 22:03 ` stephane eranian
2008-12-16 14:42 ` Peter Zijlstra
2008-12-16 16:55 ` Vince Weaver
2008-12-16 21:52 ` Paul Mackerras
2008-12-16 12:22 ` Pavel Machek
2008-12-16 12:50 ` Ingo Molnar
2008-12-16 12:57 ` Pavel Machek
2008-12-16 13:03 ` Ingo Molnar
2008-12-16 13:13 ` Arjan van de Ven
2008-12-16 20:04 ` Pavel Machek
2008-12-16 14:45 ` Peter Zijlstra
2008-12-16 15:46 ` [Perfctr-devel] " Martin Cracauer
2008-12-16 17:38 ` Vince Weaver
2008-12-16 19:47 ` Corey Ashford
2008-12-16 20:55 ` Vince Weaver
2008-12-16 19:56 ` William Cohen [this message]
2008-12-17 1:51 ` [Perfctr-devel] " Andi Kleen
2008-12-17 1:56 ` Samuel Thibault
[not found] ` <d484eb1f0812162357n7a851f2fncc0abaae9bd293a4@mail.gmail.com>
2008-12-17 9:18 ` Andi Kleen
[not found] ` <d484eb1f0812170611s597e014cl5fb98d6dd81afd49@mail.gmail.com>
2008-12-17 15:06 ` Andi Kleen
2008-12-17 16:00 ` William Cohen
2008-12-17 20:53 ` Corey Ashford
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=494807D2.3060808@redhat.com \
--to=wcohen@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=eranian@googlemail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=perfctr-devel@lists.sourceforge.net \
--cc=robert.richter@amd.com \
--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.