diff --git a/cmd/config/config_tables.go b/cmd/config/config_tables.go index 58f06bfe..2870da2c 100644 --- a/cmd/config/config_tables.go +++ b/cmd/config/config_tables.go @@ -91,7 +91,7 @@ func configurationTableValues(outputs map[string]script.ScriptOutput) []table.Fi }...) // add ELC (for SRF, CWF and GNR only) if strings.Contains(uarch, cpus.UarchSRF) || strings.Contains(uarch, cpus.UarchGNR) || strings.Contains(uarch, cpus.UarchCWF) { - fields = append(fields, table.Field{Name: "Efficiency Latency Control", Description: "--elc ", Values: []string{extract.ELCSummaryFromOutput(outputs)}}) + fields = append(fields, table.Field{Name: "Efficiency Latency Control", Description: "--elc ", Values: []string{extract.ELCSummaryFromOutput(outputs)}}) } // add prefetchers for _, pf := range extract.PrefetcherDefinitions { diff --git a/cmd/config/flag_groups.go b/cmd/config/flag_groups.go index 114286ae..b3a6ee89 100644 --- a/cmd/config/flag_groups.go +++ b/cmd/config/flag_groups.go @@ -76,7 +76,7 @@ const ( var governorOptions = []string{"performance", "powersave"} // elcOptions - list of valid elc options -var elcOptions = []string{"latency-optimized", "default"} +var elcOptions = []string{"latency-optimized", "power-optimized"} // prefetcherOptions - list of valid prefetcher options var prefetcherOptions = []string{"enable", "disable"} diff --git a/cmd/config/restore.go b/cmd/config/restore.go index c6e22b63..ca2bb330 100644 --- a/cmd/config/restore.go +++ b/cmd/config/restore.go @@ -353,7 +353,7 @@ func convertValue(flagName string, rawValue string) (string, error) { // "performance" or "powersave" return parseEnableDisableOrOption(rawValue, governorOptions) case flagELCName: - // "Default" -> "default" + // "Power-Optimized" -> "power-optimized" // "Latency-Optimized" -> "latency-optimized" rawValueLower := strings.ToLower(rawValue) if slices.Contains(elcOptions, rawValueLower) { diff --git a/cmd/config/restore_test.go b/cmd/config/restore_test.go index 056536fb..0f1aea13 100644 --- a/cmd/config/restore_test.go +++ b/cmd/config/restore_test.go @@ -142,8 +142,8 @@ func TestConvertValue(t *testing.T) { {"Prefetcher enabled", "pref-l2hw", "Enabled", "enable", false}, {"Prefetcher disabled", "pref-l2hw", "Disabled", "disable", false}, {"C6 enabled", "c6", "Enabled", "enable", false}, - {"ELC lowercase", "elc", "default", "default", false}, - {"ELC capitalized", "elc", "Default", "default", false}, + {"ELC lowercase", "elc", "power-optimized", "power-optimized", false}, + {"ELC capitalized", "elc", "Power-Optimized", "power-optimized", false}, {"Core SSE freq buckets", "core-max-buckets", "1-44/3.6, 45-52/3.5, 53-60/3.4", "1-44/3.6, 45-52/3.5, 53-60/3.4", false}, {"Core SSE freq buckets full", "core-max-buckets", "1-44/3.6, 45-52/3.5, 53-60/3.4, 61-72/3.2, 73-76/3.1, 77-86/3.0", "1-44/3.6, 45-52/3.5, 53-60/3.4, 61-72/3.2, 73-76/3.1, 77-86/3.0", false}, {"Core SSE freq buckets invalid", "core-max-buckets", "invalid-format", "", true}, diff --git a/cmd/config/set.go b/cmd/config/set.go index 96699308..75052bd6 100644 --- a/cmd/config/set.go +++ b/cmd/config/set.go @@ -781,7 +781,7 @@ func setELC(elc string, myTarget target.Target, localTempDir string) error { case elcOptions[0]: mode = "latency-optimized-mode" case elcOptions[1]: - mode = "default" + mode = "optimized-power-mode" default: return fmt.Errorf("invalid ELC mode: %s", elc) } diff --git a/cmd/report/report_tables.go b/cmd/report/report_tables.go index 8c1f8584..5f2f008e 100644 --- a/cmd/report/report_tables.go +++ b/cmd/report/report_tables.go @@ -862,9 +862,9 @@ func elcTableInsights(outputs map[string]script.ScriptOutput, tableValues table. } } for _, mode := range tableValues.Fields[modeFieldIndex].Values { - if mode != "" && mode != "Default" { + if mode != "" && mode != "Power Optimized" { insights = append(insights, table.Insight{ - Recommendation: "Consider setting Efficiency Latency Control mode to 'Default' to balance uncore performance and power utilization.", + Recommendation: "Consider setting Efficiency Latency Control mode to 'Power Optimized' to balance uncore performance and power utilization.", Justification: fmt.Sprintf("ELC mode is set to '%s' on at least one die.", mode), }) break diff --git a/internal/extract/power.go b/internal/extract/power.go index 7f0d9983..18fb4087 100644 --- a/internal/extract/power.go +++ b/internal/extract/power.go @@ -204,7 +204,7 @@ func ELCFieldValuesFromOutput(outputs map[string]script.ScriptOutput) (fieldValu if row[5] == "0" && row[6] == "0" && row[7] == "0" { mode = "Latency Optimized" } else if row[5] == "800" && row[6] == "10" && row[7] == "94" { - mode = "Default" + mode = "Power Optimized" } else { mode = "Custom" } @@ -213,7 +213,7 @@ func ELCFieldValuesFromOutput(outputs map[string]script.ScriptOutput) (fieldValu case "0": mode = "Latency Optimized" case "1200": - mode = "Default" + mode = "Power Optimized" default: mode = "Custom" } diff --git a/tools/Makefile b/tools/Makefile index f7b46bd0..3fe5e9fc 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -25,7 +25,7 @@ default: tools-x86_64 .PHONY: sysstat sysstat-aarch64 sysstat-repo .PHONY: tsc turbostat -tools-x86_64: async-profiler avx-turbo cpuid dmidecode ethtool fio ipmitool lshw lspci msr-tools pcm spectre-meltdown-checker sshpass stackcollapse-perf stress-ng sysstat tsc turbostat +tools-x86_64: async-profiler avx-turbo cpuid dmidecode ethtool fio ipmitool lshw lspci msr-tools pcm bhs-power-mode.sh spectre-meltdown-checker sshpass stackcollapse-perf stress-ng sysstat tsc turbostat mkdir -p bin/x86_64 cp -R async-profiler bin/x86_64/ cp avx-turbo/avx-turbo bin/x86_64/ @@ -41,7 +41,7 @@ tools-x86_64: async-profiler avx-turbo cpuid dmidecode ethtool fio ipmitool lshw cp msr-tools/rdmsr bin/x86_64/ cp msr-tools/wrmsr bin/x86_64/ cp pcm/build/bin/pcm-tpmi bin/x86_64/ - cp pcm/scripts/bhs-power-mode.sh bin/x86_64/ + cp bhs-power-mode.sh bin/x86_64/ cp perf-archive/perf-archive.sh bin/x86_64/perf-archive && chmod +rx bin/x86_64/perf-archive cp spectre-meltdown-checker/spectre-meltdown-checker.sh bin/x86_64/ cp sshpass/sshpass bin/x86_64/ @@ -316,6 +316,11 @@ endif cd pcm/build && cmake -DNO_ASAN=1 .. cd pcm/build && cmake --build . +PCM_BHS_POWER_MODE_VERSION := 8fdf97bc9636792e05e4be82421efc1c9aec980f +bhs-power-mode.sh: + wget $(WGET_OPTS) https://raw.githubusercontent.com/intel/pcm/$(PCM_BHS_POWER_MODE_VERSION)/scripts/bhs-power-mode.sh + chmod +x bhs-power-mode.sh + PERF_VERSION := 6.15.3 linux-$(PERF_VERSION).tar.xz: wget $(WGET_OPTS) https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$(PERF_VERSION).tar.xz