tools/power turbostat: enable turbostat to support Knights Mill (KNM)
v2 cover tools/power turbostat: enable turbostat to support Knights Mill (KNM)
This patchset is rebased onto 08328814256d888634ff15ba8fb67e2ae4340b64.
First patch improves code style by replacing raw numbers of CPUID with descriptive macros of processor names.
The second patch adds Knights Mill (KNM) to the list of CPUIDs supported by turbostat.
Both patches come in new versions where trailing comments, which described CPUs, are removed because self-descriptive macros are used instead raw numbers.
v2: Remove change-id tag.
Piotr Luc (2):
tools/power turbostat: Use Intel family processor macros tools/power turbostat: enable turbostat to support Knights Mill (KNM)
tools/power/x86/turbostat/Makefile | 3 +- tools/power/x86/turbostat/turbostat.c | 250 ++++++++++++++++++---------------- 2 files changed, 131 insertions(+), 122 deletions(-)
Signature · 1 line
2.10.1
PATCH v3 2/2 tools/power turbostat: enable turbostat to support Knights Mill (KNM)
Add Knights Mill (KNM) to the list of CPUIDs supported by turbostat.
---
v2: Remove trailing comments.
v3: Remove change-id tag.
tools/power/x86/turbostat/turbostat.c | 7 +++++++ 1 file changed, 7 insertions(+)
tools/power/x86/turbostat/turbostat.c +7 -0
@@ -2213,6 +2213,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model) pkg_cstate_limits = amt_pkg_cstate_limits;break ;case INTEL_FAM6_XEON_PHI_KNL : +case INTEL_FAM6_XEON_PHI_KNM : pkg_cstate_limits = phi_pkg_cstate_limits;break ;case INTEL_FAM6_ATOM_GOLDMONT :
@@ -2238,6 +2239,7 @@ int has_nhm_turbo_ratio_limit(unsigned int family, unsigned int model)case INTEL_FAM6_NEHALEM_EX :case INTEL_FAM6_WESTMERE_EX :case INTEL_FAM6_XEON_PHI_KNL : +case INTEL_FAM6_XEON_PHI_KNM :return 0 ;default :return 1 ;
@@ -2285,6 +2287,7 @@ int has_knl_turbo_ratio_limit(unsigned int family, unsigned int model)switch (model) {case INTEL_FAM6_XEON_PHI_KNL : +case INTEL_FAM6_XEON_PHI_KNM :return 1 ;default :return 0 ;
@@ -2315,6 +2318,7 @@ int has_config_tdp(unsigned int family, unsigned int model)case INTEL_FAM6_SKYLAKE_X :case INTEL_FAM6_XEON_PHI_KNL : +case INTEL_FAM6_XEON_PHI_KNM :return 1 ;default :return 0 ;
@@ -2616,6 +2620,7 @@ rapl_dram_energy_units_probe(int model, double rapl_energy_units)case INTEL_FAM6_BROADWELL_X :case INTEL_FAM6_BROADWELL_XEON_D :case INTEL_FAM6_XEON_PHI_KNL : +case INTEL_FAM6_XEON_PHI_KNM :return (rapl_dram_energy_units =15.3 /1000000 );default :return (rapl_energy_units);
@@ -2664,6 +2669,7 @@ void rapl_probe(unsigned int family, unsigned int model)case INTEL_FAM6_BROADWELL_XEON_D :case INTEL_FAM6_SKYLAKE_X :case INTEL_FAM6_XEON_PHI_KNL : +case INTEL_FAM6_XEON_PHI_KNM : do_rapl =RAPL_PKG |RAPL_DRAM |RAPL_DRAM_POWER_INFO |RAPL_DRAM_PERF_STATUS |RAPL_PKG_PERF_STATUS |RAPL_PKG_POWER_INFO ;break ;case INTEL_FAM6_SANDYBRIDGE_X :
@@ -3024,6 +3030,7 @@ int is_knl(unsigned int family, unsigned int model)return 0 ;switch (model) {case INTEL_FAM6_XEON_PHI_KNL : +case INTEL_FAM6_XEON_PHI_KNM :return 1 ; }return 0 ;
Signature · 1 line
2.10.1
PATCH v4 1/2 tools/power turbostat: Use Intel family processor macros
In reply to Piotr LucUse macros of Intel processor families instead of raw numbers.
---
v2: Include Intel family header.
v3: Remove trailing comments.
v4: Remove change-id tag.
tools/power/x86/turbostat/Makefile | 3 +- tools/power/x86/turbostat/turbostat.c | 243 +++++++++++++++++----------------- 2 files changed, 124 insertions(+), 122 deletions(-)
tools/power/x86/turbostat/Makefile +2 -1
@@ -9,7 +9,8 @@ endif turbostat : turbostat.c CFLAGS += -Wall -CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"' +CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"' \ + -DFAMILYHEADER='"../../../../arch/x86/include/asm/intel-family.h"' %: %.c @mkdir -p $(BUILD_OUTPUT)
tools/power/x86/turbostat/turbostat.c +122 -121
372 lines not on this page · raw message
Signature · 1 line
2.10.1