Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/config/config_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <default|latency-optimized>", Values: []string{extract.ELCSummaryFromOutput(outputs)}})
fields = append(fields, table.Field{Name: "Efficiency Latency Control", Description: "--elc <power-optimized|latency-optimized>", Values: []string{extract.ELCSummaryFromOutput(outputs)}})
}
// add prefetchers
for _, pf := range extract.PrefetcherDefinitions {
Expand Down
2 changes: 1 addition & 1 deletion cmd/config/flag_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion cmd/config/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/config/restore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion cmd/config/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/report/report_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions internal/extract/power.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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"
}
Expand Down
9 changes: 7 additions & 2 deletions tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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/
Expand Down Expand Up @@ -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
Expand Down