Re: [PATCH 0/2] turbostat: Improve support for AMD Zen CPUs (RAPL, CPUID) (Resend)

2018-07-26 Thread Len Brown
> (I wasn't sure who to send this to initially - maybe the
> MAINTAINERS file should be updated so get_maintainer.pl gives better
> results).

turbostat was added to MAINTAINERS in 4.18-rc1


Re: [PATCH 0/2] turbostat: Improve support for AMD Zen CPUs (RAPL, CPUID) (Resend)

2018-07-24 Thread Calvin Walton
On Wed, 2018-07-18 at 18:26 -0400, Calvin Walton wrote:
> Based on the documentation provided in AMD's Open-Source
> Register Reference For AMD Family 17h Processors:
> https://support.amd.com/TechDocs/56255_OSRR.pdf
> 
> I've added support for reading Cores and Package energy usage from
> AMD's
> "RAPL" MSRs. In order to correctly detect the AMD processor
> generation,
> I've also had to update the CPUID code to handle AMD's extended
> family
> field.

Having now had the chance to look at recent changes to the turbostat
tool (these patches were based on the version from the 4.17 kernel), it
looks like I'm going to have to update the second patch in this set
because of the changes to handle processor "Nodes".

One thing I'm not sure about is whether the "Package" power reporting
on multi-node AMD systems is reported per node - I suspect it is, but
don't have hardware to confirm. If someone has a processor where this
applies (I'm guessing this is Threadripper and EPYC?) I'd appreciate
seeing the output of

turbostat --Dump --add msr0xc001029b,u32,raw

to know which is the case.

-- 
Calvin Walton 



[PATCH 0/2] turbostat: Improve support for AMD Zen CPUs (RAPL, CPUID) (Resend)

2018-07-18 Thread Calvin Walton
Based on the documentation provided in AMD's Open-Source
Register Reference For AMD Family 17h Processors:
https://support.amd.com/TechDocs/56255_OSRR.pdf

I've added support for reading Cores and Package energy usage from AMD's
"RAPL" MSRs. In order to correctly detect the AMD processor generation,
I've also had to update the CPUID code to handle AMD's extended family
field.

I've resent this including the linux-pm mailing list per Rafael's
suggestion (I wasn't sure who to send this to initially - maybe the
MAINTAINERS file should be updated so get_maintainer.pl gives better
results). The patches are unchanged from my previous submission.

Here's some example output from my (idle) Ryzen 3 2200G test system:

turbostat version 17.06.23 - Len Brown 
CPUID(0): AuthenticAMD 13 CPUID levels; family:model:stepping 0x17:11:0 
(23:17:0)
CPUID(1): SSE3 MONITOR - - - TSC MSR - -
CPUID(6): APERF, No-TURBO, No-DTS, No-PTM, No-HWP, No-HWPnotify, No-HWPwindow, 
No-HWPepp, No-HWPpkg, No-EPB
CPUID(7): No-SGX
RAPL: 364 sec. Joule Counter Range, at 180 Watts
cpu2: POLL: CPUIDLE CORE POLL IDLE
cpu2: C1: ACPI FFH INTEL MWAIT 0x0
cpu2: C2: ACPI IOPORT 0x414
cpu2: cpufreq driver: acpi-cpufreq
cpu2: cpufreq governor: schedutil
cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.15 Joules, 0.000977 
sec.)
CoreCPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ C1  C2  C1% 
C2% CorWatt PkgWatt
-   -   33  2.20148535005073126336942.75
95.12   0.033.29
0   0   33  2.20148335001213354 886 2.96
94.89   0.013.29
1   1   25  1.6714743500907 197 682 1.55
96.80   0.01
2   2   33  2.24147835001674450 11754.16
93.70   0.01
3   3   40  2.67150135001279262 951 2.33
95.07   0.01


Calvin Walton (2):
  turbostat: Read extended processor family from CPUID
  turbostat: Add support for AMD Fam 17h (Zen) RAPL

 tools/power/x86/turbostat/turbostat.c | 184 ++
 1 file changed, 156 insertions(+), 28 deletions(-)

-- 
2.18.0



Re: [PATCH 0/2] turbostat: Improve support for AMD Zen CPUs (RAPL, CPUID)

2018-07-18 Thread Rafael J. Wysocki
On Wednesday, July 18, 2018 3:36:40 AM CEST Calvin Walton wrote:
> Based on the documentation provided in AMD's Open-Source
> Register Reference For AMD Family 17h Processors:
> https://support.amd.com/TechDocs/56255_OSRR.pdf
> 
> I've added support for reading Cores and Package energy usage from AMD's
> "RAPL" MSRs. In order to correctly detect the AMD processor generation,
> I've also had to update the CPUID code to handle AMD's extended family
> field.
> 
> Here's some example output from my (idle) Ryzen 3 2200G test system:
> 
> turbostat version 17.06.23 - Len Brown 
> CPUID(0): AuthenticAMD 13 CPUID levels; family:model:stepping 0x17:11:0 
> (23:17:0)
> CPUID(1): SSE3 MONITOR - - - TSC MSR - -
> CPUID(6): APERF, No-TURBO, No-DTS, No-PTM, No-HWP, No-HWPnotify, 
> No-HWPwindow, No-HWPepp, No-HWPpkg, No-EPB
> CPUID(7): No-SGX
> RAPL: 364 sec. Joule Counter Range, at 180 Watts
> cpu2: POLL: CPUIDLE CORE POLL IDLE
> cpu2: C1: ACPI FFH INTEL MWAIT 0x0
> cpu2: C2: ACPI IOPORT 0x414
> cpu2: cpufreq driver: acpi-cpufreq
> cpu2: cpufreq governor: schedutil
> cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.15 Joules, 
> 0.000977 sec.)
> Core  CPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ C1  C2  C1% 
> C2% CorWatt PkgWatt
> - -   33  2.20148535005073126336942.75
> 95.12   0.033.29
> 0 0   33  2.20148335001213354 886 2.96
> 94.89   0.013.29
> 1 1   25  1.6714743500907 197 682 1.55
> 96.80   0.01
> 2 2   33  2.24147835001674450 11754.16
> 93.70   0.01
> 3 3   40  2.67150135001279262 951 2.33
> 95.07   0.01
> 
> 
> Calvin Walton (2):
>   turbostat: Read extended processor family from CPUID
>   turbostat: Add support for AMD Fam 17h (Zen) RAPL
> 
>  tools/power/x86/turbostat/turbostat.c | 184 ++
>  1 file changed, 156 insertions(+), 28 deletions(-)
> 
> 

CC to linux...@vger.kernel.org pretty please!




[PATCH 0/2] turbostat: Improve support for AMD Zen CPUs (RAPL, CPUID)

2018-07-17 Thread Calvin Walton
Based on the documentation provided in AMD's Open-Source
Register Reference For AMD Family 17h Processors:
https://support.amd.com/TechDocs/56255_OSRR.pdf

I've added support for reading Cores and Package energy usage from AMD's
"RAPL" MSRs. In order to correctly detect the AMD processor generation,
I've also had to update the CPUID code to handle AMD's extended family
field.

Here's some example output from my (idle) Ryzen 3 2200G test system:

turbostat version 17.06.23 - Len Brown 
CPUID(0): AuthenticAMD 13 CPUID levels; family:model:stepping 0x17:11:0 
(23:17:0)
CPUID(1): SSE3 MONITOR - - - TSC MSR - -
CPUID(6): APERF, No-TURBO, No-DTS, No-PTM, No-HWP, No-HWPnotify, No-HWPwindow, 
No-HWPepp, No-HWPpkg, No-EPB
CPUID(7): No-SGX
RAPL: 364 sec. Joule Counter Range, at 180 Watts
cpu2: POLL: CPUIDLE CORE POLL IDLE
cpu2: C1: ACPI FFH INTEL MWAIT 0x0
cpu2: C2: ACPI IOPORT 0x414
cpu2: cpufreq driver: acpi-cpufreq
cpu2: cpufreq governor: schedutil
cpu0: MSR_RAPL_PWR_UNIT: 0x000a1003 (0.125000 Watts, 0.15 Joules, 0.000977 
sec.)
CoreCPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ C1  C2  C1% 
C2% CorWatt PkgWatt
-   -   33  2.20148535005073126336942.75
95.12   0.033.29
0   0   33  2.20148335001213354 886 2.96
94.89   0.013.29
1   1   25  1.6714743500907 197 682 1.55
96.80   0.01
2   2   33  2.24147835001674450 11754.16
93.70   0.01
3   3   40  2.67150135001279262 951 2.33
95.07   0.01


Calvin Walton (2):
  turbostat: Read extended processor family from CPUID
  turbostat: Add support for AMD Fam 17h (Zen) RAPL

 tools/power/x86/turbostat/turbostat.c | 184 ++
 1 file changed, 156 insertions(+), 28 deletions(-)

-- 
2.18.0