From: Vince Weaver <vincent.weaver@maine.edu>
To: Huang Rui <ray.huang@amd.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>,
Borislav Petkov <bp@suse.de>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
Robert Richter <rric@kernel.org>,
Jacob Shin <jacob.w.shin@gmail.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Kan Liang <kan.liang@intel.com>,
linux-kernel@vger.kernel.org, x86@kernel.org,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
Borislav Petkov <bp@alien8.de>,
Guenter Roeck <linux@roeck-us.net>,
Fengguang Wu <fengguang.wu@intel.com>
Subject: Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism
Date: Thu, 16 Jun 2016 17:10:54 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.2.20.1606161700500.2744@macbook-air> (raw)
In-Reply-To: <20160616055933.GA8522@hr-amur2>
On Thu, 16 Jun 2016, Huang Rui wrote:
> On Thu, Jun 16, 2016 at 01:38:13PM +0800, Huang Rui wrote:
>
> After considering carefully, the original method should be OK.
>
> AMD nomenclature for CMT systems:
>
> [node 0] -> [Compute Unit 0] -> [Compute Unit Core 0] -> Linux CPU 0
> -> [Compute Unit Core 1] -> Linux CPU 1
> -> [Compute Unit 1] -> [Compute Unit Core 0] -> Linux CPU 2
> -> [Compute Unit Core 1] -> Linux CPU 3
>
> The deltaN is power per compute unit. Current one package has two CUs.
> In the *same* interval, CU0's power is 10W, CU1's power is 15W. The
> package (CU0 + CU1) power should be 15W, right? Because the interval
> is the same.
>
> Q = Q1 + Q2. P = Q/t = (Q1 + Q2)/t = Q1/t + Q2/t = P1 + P2.
>
> Is that clear?
OK, I was misunderstanding. I somehow thought there was a periodic timer
that was adding accumulating power over time.
But no, the driver just assumes the PTSC does not overflow? And that
addition is just there to handle adding all the cores together?
If so, then I agree that the addition makes sense, sorry for confusing
things.
Although I think it would be better if we reported Joules (like
RAPL does) rather than average power, but too late to change that now.
Also, on my machine I get results that make no physical sense, such as:
sudo perf stat -a -e power/power-pkg/ /usr/games/primes 1 500000000 > /dev/null
Performance counter stats for 'system wide':
4,472,401.06 mWatts power/power-pkg/
6.956135769 seconds time elapsed
I somehow don't think the CPU is really burning 4kW of Power.
Vince
next prev parent reply other threads:[~2016-06-16 21:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 5:45 [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism Huang Rui
2016-03-21 9:55 ` [tip:perf/urgent] " tip-bot for Huang Rui
2016-06-16 1:13 ` [REDO PATCH v7] " Vince Weaver
2016-06-16 5:38 ` Huang Rui
2016-06-16 5:59 ` Huang Rui
2016-06-16 21:10 ` Vince Weaver [this message]
2016-06-16 21:16 ` Vince Weaver
2016-06-16 21:36 ` Borislav Petkov
2016-06-16 16:47 ` Borislav Petkov
2016-06-17 9:58 ` Huang Rui
2016-07-19 18:22 ` Vince Weaver
2016-07-20 2:58 ` Huang Rui
2016-06-16 20:44 ` Vince Weaver
2016-06-17 10:03 ` Huang Rui
2016-06-17 15:54 ` Vince Weaver
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.DEB.2.20.1606161700500.2744@macbook-air \
--to=vincent.weaver@maine.edu \
--cc=Aravind.Gopalakrishnan@amd.com \
--cc=acme@kernel.org \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=fengguang.wu@intel.com \
--cc=jacob.w.shin@gmail.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=ray.huang@amd.com \
--cc=rric@kernel.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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).