linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Monakov <amonakov@ispras.ru>
To: Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	mingo@elte.hu, irogers@google.com, kim.phillips@amd.com,
	jolsa@redhat.com
Subject: Re: [PATCH 0/3] perf/x86/rapl: Enable RAPL for AMD Fam17h
Date: Sat, 16 May 2020 19:56:22 +0300 (MSK)	[thread overview]
Message-ID: <alpine.LNX.2.20.13.2005161908000.16957@monopod.intra.ispras.ru> (raw)
In-Reply-To: <20200515215733.20647-1-eranian@google.com>

On Fri, 15 May 2020, Stephane Eranian wrote:

> The series first moves the rapl.c file to common perf_events x86 and then
> adds the support.
> From the user's point of view, the interface is identical with
> /sys/devices/power. The energy-pkg event is the only one supported.

AMD also has per-core energy metering via MSR 0xc001029a, and I wonder
if you have plans to expose it to perf as well. I see it does not fit
so nicely with the existing code (as it's per-core instead of per-die).

The turbostat tool already exposes these per-core readings:

Core    CPU     Avg_MHz Busy%   Bzy_MHz TSC_MHz CorWatt PkgWatt
-       -       3951    100.00  3951    2373    54.92   30.04
0       0       3945    100.00  3945    2370    8.97    29.98
1       1       3945    100.00  3945    2370    9.11
2       2       3945    100.00  3945    2370    8.96
4       3       3946    100.00  3946    2370    9.32
5       4       3946    100.00  3946    2370    9.11
6       5       3946    100.00  3946    2370    9.39

turbostat sums the per-core energy figures to show the per-socket 54.92W
value. Though as you can see on this example, the figure is not in agreement
with the per-socket MSR you're using in your patch. Maybe the per-core
values are less reliable, but I believe I have a test that shows per-package
figure to be inaccurate as well. It would be nice if AMD clarified how the
counters work.

And, for what (little) it's worth, the series is:

Tested-by: Alexander Monakov <amonakov@ispras.ru>

Thank you.
Alexander

  parent reply	other threads:[~2020-05-16 16:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15 21:57 [PATCH 0/3] perf/x86/rapl: Enable RAPL for AMD Fam17h Stephane Eranian
2020-05-15 21:57 ` [PATCH 1/3] perf/x86/rapl: move RAPL support to common x86 code Stephane Eranian
2020-05-18  9:08   ` Peter Zijlstra
2020-05-15 21:57 ` [PATCH 2/3] perf/x86/rapl: refactor code for Intel/AMD sharing Stephane Eranian
2020-05-18  9:23   ` Peter Zijlstra
2020-05-15 21:57 ` [PATCH 3/3] perf/x86/rapl: add AMD Fam17h RAPL support Stephane Eranian
2020-05-18  9:34   ` Peter Zijlstra
2020-05-18 20:16     ` Stephane Eranian
2020-05-20  8:34       ` Stephane Eranian
2020-05-16 16:56 ` Alexander Monakov [this message]
2020-05-18  8:50 ` [PATCH 0/3] perf/x86/rapl: Enable RAPL for AMD Fam17h Jiri Olsa

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=alpine.LNX.2.20.13.2005161908000.16957@monopod.intra.ispras.ru \
    --to=amonakov@ispras.ru \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=kim.phillips@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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;
as well as URLs for NNTP newsgroup(s).