From: Andi Kleen <ak@linux.intel.com>
To: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Kan Liang <kan.liang@intel.com>,
"mingo@redhat.com" <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Adrian Hunter <adrian.hunter@intel.com>,
David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH RFC V2 1/1] x86, perf: Add a freq pmu driver
Date: Thu, 23 Jul 2015 10:25:43 -0700 [thread overview]
Message-ID: <20150723172543.GQ7380@tassilo.jf.intel.com> (raw)
In-Reply-To: <CABPqkBRXQqGWM9j_Bwz4MoczNsjhOTt494EwktAV+0BZRiJnfA@mail.gmail.com>
> I understand the value of the tsc and smi events. It is not
> clear to me what aperf/mperf buys you over cycles and ref-cycles:
>
> $ perf stat -a -e msr/aperf/,msr/mperf/,cycles,ref-cycles -C 1 -I 1000 sleep 10
> # time counts unit events
> 2.000361718 14,826,353 msr/aperf/
> 2.000361718 11,865,170 msr/mperf/
> 2.000361718 17,170,101 cycles
> 2.000361718 13,629,675 ref-cycles
>
> Only the ratio aperf/mperf is defined, here 1.25 and the ratio
> cycles/ref-cycles is 1.25 as well. So what is a situation where
> aperf/mperf provides better info than cycles/ref-cycles?
> The SDM also says aperf/mperf only defined when running in C0 mode.
aperf/mperf excludes idle and it accounts for throttling and p-state
coordination. So it's a indicator how busy the CPU is while running.
That's why it is used as input to the p-state algorithm.
cycles/ref-cycles is just the core busy indicator related
to idle. That's a different metric.
Also we have PPERF now on some parts (productive performance count),
but it also needs a ratio, so MPERF is needed to get the ratio.
BTW with the table driven scheme adding new MSRs is very cheap
(just a table entry usually) so there is little reason for not adding any.
-Andi
next prev parent reply other threads:[~2015-07-23 17:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 15:49 [PATCH RFC V2 1/1] x86, perf: Add a freq pmu driver Kan Liang
2015-07-21 3:10 ` Stephane Eranian
2015-07-21 6:01 ` Andy Lutomirski
2015-07-21 6:21 ` Stephane Eranian
2015-07-21 6:23 ` Andy Lutomirski
2015-07-21 9:55 ` Peter Zijlstra
2015-07-21 9:55 ` Peter Zijlstra
2015-07-23 15:44 ` Stephane Eranian
2015-07-23 15:52 ` Andy Lutomirski
2015-07-23 16:00 ` Stephane Eranian
2015-07-23 17:25 ` Andi Kleen [this message]
2015-07-26 16:31 ` Jiri Olsa
2015-07-27 17:40 ` Andy Lutomirski
2015-08-04 9:01 ` [tip:perf/core] perf/x86: Add an MSR PMU driver tip-bot for Andy Lutomirski
2015-08-04 14:50 ` Andy Lutomirski
2015-08-04 15:03 ` Liang, Kan
2015-08-04 18:00 ` Andy Lutomirski
2015-08-04 18:11 ` Liang, Kan
2015-08-04 18:13 ` Andy Lutomirski
2015-08-04 20:39 ` Liang, Kan
2015-08-06 15:21 ` Peter Zijlstra
2015-08-06 15:30 ` Andy Lutomirski
2015-08-06 15:59 ` Peter Zijlstra
2015-08-07 8:34 ` Peter Zijlstra
2015-08-10 2:12 ` Andy Lutomirski
2015-08-10 14:02 ` Liang, Kan
2015-08-10 14:24 ` Peter Zijlstra
2015-08-06 17:44 ` Liang, Kan
2015-08-10 11:19 ` Jiri Olsa
2015-08-10 11:42 ` Peter Zijlstra
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=20150723172543.GQ7380@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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