diff --git a/cmd/config/config.go b/cmd/config/config.go index 8538f9a3..1b3be80f 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -15,6 +15,7 @@ import ( "perfspect/internal/script" "perfspect/internal/target" "perfspect/internal/util" + "regexp" "strconv" "strings" @@ -23,29 +24,37 @@ import ( ) var ( - flagCores int - flagLlcSize float64 - flagAllCoreMaxFrequency float64 - flagUncoreMaxFrequency float64 - flagUncoreMinFrequency float64 - flagPower int - flagEpb int - flagEpp int - flagGovernor string - flagElc string + flagCores int + flagLlcSize float64 + flagAllCoreMaxFrequency float64 + flagUncoreMaxFrequency float64 + flagUncoreMinFrequency float64 + flagUncoreMaxComputeFrequency float64 + flagUncoreMinComputeFrequency float64 + flagUncoreMaxIOFrequency float64 + flagUncoreMinIOFrequency float64 + flagPower int + flagEpb int + flagEpp int + flagGovernor string + flagElc string ) const ( - flagCoresName = "cores" - flagLlcSizeName = "llc" - flagAllCoreMaxFrequencyName = "coremax" - flagUncoreMaxFrequencyName = "uncoremax" - flagUncoreMinFrequencyName = "uncoremin" - flagPowerName = "power" - flagEpbName = "epb" - flagEppName = "epp" - flagGovernorName = "governor" - flagElcName = "elc" + flagCoresName = "cores" + flagLlcSizeName = "llc" + flagAllCoreMaxFrequencyName = "coremax" + flagUncoreMaxFrequencyName = "uncoremax" + flagUncoreMinFrequencyName = "uncoremin" + flagUncoreMaxComputeFrequencyName = "uncoremaxcompute" + flagUncoreMinComputeFrequencyName = "uncoremincompute" + flagUncoreMaxIOFrequencyName = "uncoremaxio" + flagUncoreMinIOFrequencyName = "uncoreminio" + flagPowerName = "power" + flagEpbName = "epb" + flagEppName = "epp" + flagGovernorName = "governor" + flagElcName = "elc" ) // governorOptions - list of valid governor options @@ -84,6 +93,10 @@ func init() { Cmd.Flags().Float64Var(&flagAllCoreMaxFrequency, flagAllCoreMaxFrequencyName, 0, "") Cmd.Flags().Float64Var(&flagUncoreMaxFrequency, flagUncoreMaxFrequencyName, 0, "") Cmd.Flags().Float64Var(&flagUncoreMinFrequency, flagUncoreMinFrequencyName, 0, "") + Cmd.Flags().Float64Var(&flagUncoreMaxComputeFrequency, flagUncoreMaxComputeFrequencyName, 0, "") + Cmd.Flags().Float64Var(&flagUncoreMinComputeFrequency, flagUncoreMinComputeFrequencyName, 0, "") + Cmd.Flags().Float64Var(&flagUncoreMaxIOFrequency, flagUncoreMaxIOFrequencyName, 0, "") + Cmd.Flags().Float64Var(&flagUncoreMinIOFrequency, flagUncoreMinIOFrequencyName, 0, "") Cmd.Flags().IntVar(&flagPower, flagPowerName, 0, "") Cmd.Flags().IntVar(&flagEpb, flagEpbName, 0, "") Cmd.Flags().IntVar(&flagEpp, flagEppName, 0, "") @@ -132,11 +145,27 @@ func getFlagGroups() []common.FlagGroup { }, { Name: flagUncoreMaxFrequencyName, - Help: "set uncore max frequency (GHz)", + Help: "set uncore max frequency on EMR and earlier architectures (GHz)", }, { Name: flagUncoreMinFrequencyName, - Help: "set uncore min frequency (GHz)", + Help: "set uncore min frequency on EMR and earlier architectures (GHz)", + }, + { + Name: flagUncoreMaxComputeFrequencyName, + Help: "set uncore max compute frequency on SRF and newer architectures (GHz)", + }, + { + Name: flagUncoreMinComputeFrequencyName, + Help: "set uncore min compute frequency on SRF and newer architectures (GHz)", + }, + { + Name: flagUncoreMaxIOFrequencyName, + Help: "set uncore max IO frequency on SRF and newer architectures (GHz)", + }, + { + Name: flagUncoreMinIOFrequencyName, + Help: "set uncore min IO frequency on SRF and newer architectures (GHz)", }, { Name: flagPowerName, @@ -291,6 +320,18 @@ func runCmd(cmd *cobra.Command, args []string) error { if cmd.Flags().Lookup(flagUncoreMinFrequencyName).Changed { setUncoreFrequency(false, flagUncoreMinFrequency, myTarget, localTempDir) } + if cmd.Flags().Lookup(flagUncoreMaxComputeFrequencyName).Changed { + setUncoreDieFrequency(true, true, flagUncoreMaxComputeFrequency, myTarget, localTempDir) + } + if cmd.Flags().Lookup(flagUncoreMinComputeFrequencyName).Changed { + setUncoreDieFrequency(false, true, flagUncoreMinComputeFrequency, myTarget, localTempDir) + } + if cmd.Flags().Lookup(flagUncoreMaxIOFrequencyName).Changed { + setUncoreDieFrequency(true, false, flagUncoreMaxIOFrequency, myTarget, localTempDir) + } + if cmd.Flags().Lookup(flagUncoreMinIOFrequencyName).Changed { + setUncoreDieFrequency(false, false, flagUncoreMinIOFrequency, myTarget, localTempDir) + } if cmd.Flags().Lookup(flagPowerName).Changed { setPower(flagPower, myTarget, localTempDir) } @@ -539,6 +580,90 @@ func setCoreFrequency(coreFrequency float64, myTarget target.Target, localTempDi } } +func setUncoreDieFrequency(maxFreq bool, computeDie bool, uncoreFrequency float64, myTarget target.Target, localTempDir string) { + var minmax, dietype string + if maxFreq { + minmax = "max" + } else { + minmax = "min" + } + if computeDie { + dietype = "compute" + } else { + dietype = "I/O" + } + fmt.Printf("set uncore %s %s die frequency to %.1f GHz on %s\n", minmax, dietype, uncoreFrequency, myTarget.GetName()) + targetFamily, err := myTarget.GetFamily() + if err != nil { + fmt.Fprintf(os.Stderr, "error getting target family: %v\n", err) + slog.Error("failed to get target family", slog.String("error", err.Error())) + return + } + targetModel, err := myTarget.GetModel() + if err != nil { + fmt.Fprintf(os.Stderr, "error getting target model: %v\n", err) + slog.Error("failed to get target model", slog.String("error", err.Error())) + return + } + if targetFamily != "6" || (targetFamily == "6" && targetModel != "173" && targetModel != "175") { + err := fmt.Errorf("uncore frequency setting not supported on %s due to family/model mismatch", myTarget.GetName()) + slog.Error(err.Error()) + fmt.Fprintf(os.Stderr, "Error: failed to set uncore frequency: %v\n", err) + return + } + type dieId struct { + instance string + entry string + } + var dies []dieId + // build list of compute or IO dies + scripts := []script.ScriptDefinition{} + scripts = append(scripts, script.GetScriptByName(script.UncoreDieTypesFromTPMIScriptName)) + outputs, err := script.RunScripts(myTarget, scripts, true, localTempDir) + if err != nil { + fmt.Fprintln(os.Stderr, err) + slog.Error("failed to run scripts on target", slog.String("target", myTarget.GetName()), slog.String("error", err.Error())) + return + } + re := regexp.MustCompile(`Read bits \d+:\d+ value (\d+) from TPMI ID .* for entry (\d+) in instance (\d+)`) + for _, line := range strings.Split(outputs[script.UncoreDieTypesFromTPMIScriptName].Stdout, "\n") { + match := re.FindStringSubmatch(line) + if match == nil { + continue + } + if computeDie && match[1] == "0" { + dies = append(dies, dieId{instance: match[3], entry: match[2]}) + } + if !computeDie && match[1] == "1" { + dies = append(dies, dieId{instance: match[3], entry: match[2]}) + } + } + + value := uint64(uncoreFrequency * 10) + var bits string + if maxFreq { + bits = "8:14" // bits 8:14 are the max frequency + } else { + bits = "15:21" // bits 15:21 are the min frequency + } + // run script for each die of specified type + for _, die := range dies { + setScript := script.ScriptDefinition{ + Name: "write max and min uncore frequency TPMI", + Script: fmt.Sprintf("pcm-tpmi 2 0x18 -d -b %s -w %d -i %s -e %s", bits, value, die.instance, die.entry), + Architectures: []string{"x86_64"}, + Families: []string{"6"}, // Intel only + Depends: []string{"pcm-tpmi"}, + Superuser: true, + } + _, err = runScript(myTarget, setScript, localTempDir) + if err != nil { + fmt.Fprintf(os.Stderr, "Error: failed to set uncore frequency: %v\n", err) + return + } + } +} + func setUncoreFrequency(maxFreq bool, uncoreFrequency float64, myTarget target.Target, localTempDir string) { var minmax string if maxFreq { @@ -548,13 +673,6 @@ func setUncoreFrequency(maxFreq bool, uncoreFrequency float64, myTarget target.T } fmt.Printf("set uncore %s frequency to %.1f GHz on %s\n", minmax, uncoreFrequency, myTarget.GetName()) scripts := []script.ScriptDefinition{} - scripts = append(scripts, script.GetScriptByName(script.LscpuScriptName)) - scripts = append(scripts, script.GetScriptByName(script.LspciBitsScriptName)) - scripts = append(scripts, script.GetScriptByName(script.LspciDevicesScriptName)) - scripts = append(scripts, script.GetScriptByName(script.UncoreMaxFromMSRScriptName)) - scripts = append(scripts, script.GetScriptByName(script.UncoreMinFromMSRScriptName)) - scripts = append(scripts, script.GetScriptByName(script.UncoreMaxFromTPMIScriptName)) - scripts = append(scripts, script.GetScriptByName(script.UncoreMinFromTPMIScriptName)) scripts = append(scripts, script.ScriptDefinition{ Name: "get uncore frequency MSR", Script: "rdmsr 0x620", @@ -582,60 +700,44 @@ func setUncoreFrequency(maxFreq bool, uncoreFrequency float64, myTarget target.T slog.Error("failed to get target model", slog.String("error", err.Error())) return } - if targetFamily == "6" && (targetModel == "173" || targetModel == "175") { //Intel, GNR and SRF only - value := uint64(uncoreFrequency * 10) - var bits string - if maxFreq { - bits = "8:14" // bits 8:14 are the max frequency - } else { - bits = "15:21" // bits 15:21 are the min frequency - } - setScript := script.ScriptDefinition{ - Name: "write max and min uncore frequency TPMI", - Script: fmt.Sprintf("pcm-tpmi 2 0x18 -d -b %s -w %d", bits, value), - Architectures: []string{"x86_64"}, - Families: []string{"6"}, // Intel only - Depends: []string{"pcm-tpmi"}, - Superuser: true, - } - _, err = runScript(myTarget, setScript, localTempDir) - if err != nil { - fmt.Fprintf(os.Stderr, "Error: failed to set uncore frequency: %v\n", err) - } - } else if targetFamily == "6" { // Intel only - msrHex := strings.TrimSpace(outputs["get uncore frequency MSR"].Stdout) - msrInt, err := strconv.ParseInt(msrHex, 16, 0) - if err != nil { - fmt.Fprintln(os.Stderr, err) - slog.Error("failed to read or parse msr value", slog.String("msr", msrHex), slog.String("error", err.Error())) - return - } - newFreq := uint64((uncoreFrequency * 1000) / 100) - var newVal uint64 - if maxFreq { - // mask out lower 6 bits to write the max frequency - newVal = uint64(msrInt) & 0xFFFFFFFFFFFFFFC0 - // add in the new frequency value - newVal = newVal | newFreq - } else { - // mask bits 8:14 to write the min frequency - newVal = uint64(msrInt) & 0xFFFFFFFFFFFF80FF - // add in the new frequency value - newVal = newVal | newFreq<<8 - } - setScript := script.ScriptDefinition{ - Name: "set uncore frequency MSR", - Script: fmt.Sprintf("wrmsr -a 0x620 %d", newVal), - Superuser: true, - Architectures: []string{"x86_64"}, - Families: []string{"6"}, // Intel only - Lkms: []string{"msr"}, - Depends: []string{"wrmsr"}, - } - _, err = runScript(myTarget, setScript, localTempDir) - if err != nil { - fmt.Fprintf(os.Stderr, "Error: failed to set uncore frequency: %v\n", err) - } + if targetFamily != "6" || (targetFamily == "6" && (targetModel == "173" || targetModel == "175")) { + err := fmt.Errorf("uncore frequency setting not supported on %s due to family/model mismatch", myTarget.GetName()) + slog.Error(err.Error()) + fmt.Fprintf(os.Stderr, "Error: failed to set uncore frequency: %v\n", err) + return + } + msrHex := strings.TrimSpace(outputs["get uncore frequency MSR"].Stdout) + msrInt, err := strconv.ParseInt(msrHex, 16, 0) + if err != nil { + fmt.Fprintln(os.Stderr, err) + slog.Error("failed to read or parse msr value", slog.String("msr", msrHex), slog.String("error", err.Error())) + return + } + newFreq := uint64((uncoreFrequency * 1000) / 100) + var newVal uint64 + if maxFreq { + // mask out lower 6 bits to write the max frequency + newVal = uint64(msrInt) & 0xFFFFFFFFFFFFFFC0 + // add in the new frequency value + newVal = newVal | newFreq + } else { + // mask bits 8:14 to write the min frequency + newVal = uint64(msrInt) & 0xFFFFFFFFFFFF80FF + // add in the new frequency value + newVal = newVal | newFreq<<8 + } + setScript := script.ScriptDefinition{ + Name: "set uncore frequency MSR", + Script: fmt.Sprintf("wrmsr -a 0x620 %d", newVal), + Superuser: true, + Architectures: []string{"x86_64"}, + Families: []string{"6"}, // Intel only + Lkms: []string{"msr"}, + Depends: []string{"wrmsr"}, + } + _, err = runScript(myTarget, setScript, localTempDir) + if err != nil { + fmt.Fprintf(os.Stderr, "Error: failed to set uncore frequency: %v\n", err) } } diff --git a/internal/report/table_defs.go b/internal/report/table_defs.go index a15b7802..e857af9d 100644 --- a/internal/report/table_defs.go +++ b/internal/report/table_defs.go @@ -258,6 +258,7 @@ var tableDefinitions = map[string]TableDefinition{ script.UncoreMinFromMSRScriptName, script.UncoreMaxFromTPMIScriptName, script.UncoreMinFromTPMIScriptName, + script.UncoreDieTypesFromTPMIScriptName, script.ChaCountScriptName, script.LscpuScriptName, script.LspciBitsScriptName, @@ -491,6 +492,7 @@ var tableDefinitions = map[string]TableDefinition{ script.UncoreMinFromMSRScriptName, script.UncoreMaxFromTPMIScriptName, script.UncoreMinFromTPMIScriptName, + script.UncoreDieTypesFromTPMIScriptName, script.SpecTurboFrequenciesScriptName, script.SpecTurboCoresScriptName, script.ElcScriptName, @@ -1015,10 +1017,27 @@ func cstateTableValues(outputs map[string]script.ScriptOutput) []Field { } func uncoreTableValues(outputs map[string]script.ScriptOutput) []Field { - return []Field{ - {Name: "Min Frequency", Values: []string{uncoreMinFrequencyFromOutput(outputs)}}, - {Name: "Max Frequency", Values: []string{uncoreMaxFrequencyFromOutput(outputs)}}, - {Name: "CHA Count", Values: []string{chaCountFromOutput(outputs)}}, + uarch := uarchFromOutput(outputs) + if uarch == "" { + slog.Error("failed to get uarch from script outputs") + return []Field{} + } + if strings.Contains(uarch, "SRF") || strings.Contains(uarch, "GNR") { + return []Field{ + {Name: "Min Frequency (Compute)", Values: []string{uncoreMinMaxDieFrequencyFromOutput(false, true, outputs)}}, + {Name: "Min Frequency (I/O)", Values: []string{uncoreMinMaxDieFrequencyFromOutput(false, false, outputs)}}, + {Name: "Max Frequency (Compute)", Values: []string{uncoreMinMaxDieFrequencyFromOutput(true, true, outputs)}}, + {Name: "Max Frequency (I/O)", Values: []string{uncoreMinMaxDieFrequencyFromOutput(true, false, outputs)}}, + {Name: "CHA Count", Values: []string{chaCountFromOutput(outputs)}}, + } + } else { // field counts need to match for the all_hosts reports to work properly + return []Field{ + {Name: "Min Frequency", Values: []string{uncoreMinFrequencyFromOutput(outputs)}}, + {Name: "N/A", Values: []string{""}}, + {Name: "Max Frequency", Values: []string{uncoreMaxFrequencyFromOutput(outputs)}}, + {Name: "N/A", Values: []string{""}}, + {Name: "CHA Count", Values: []string{chaCountFromOutput(outputs)}}, + } } } @@ -1683,18 +1702,39 @@ func systemSummaryTableValues(outputs map[string]script.ScriptOutput) []Field { } func configurationTableValues(outputs map[string]script.ScriptOutput) []Field { - return []Field{ + uarch := uarchFromOutput(outputs) + if uarch == "" { + slog.Error("failed to get uarch from script outputs") + return []Field{} + } + + fields := []Field{ {Name: "Cores per Socket", Values: []string{valFromRegexSubmatch(outputs[script.LscpuScriptName].Stdout, `^Core\(s\) per socket:\s*(.+)$`)}}, {Name: "L3 Cache", Values: []string{l3FromOutput(outputs)}}, - {Name: "Package Power / TDP (Watts)", Values: []string{tdpFromOutput(outputs)}}, - {Name: "All-Core Max Frequency (GHz)", Values: []string{allCoreMaxFrequencyFromOutput(outputs)}}, - {Name: "Uncore Max Frequency (GHz)", Values: []string{uncoreMaxFrequencyFromOutput(outputs)}}, - {Name: "Uncore Min Frequency (GHz)", Values: []string{uncoreMinFrequencyFromOutput(outputs)}}, + {Name: "Package Power / TDP", Values: []string{tdpFromOutput(outputs)}}, + {Name: "All-Core Max Frequency", Values: []string{allCoreMaxFrequencyFromOutput(outputs)}}, + } + if strings.Contains(uarch, "SRF") || strings.Contains(uarch, "GNR") { + fields = append(fields, []Field{ + {Name: "Uncore Min Frequency (Compute)", Values: []string{uncoreMinMaxDieFrequencyFromOutput(false, true, outputs)}}, + {Name: "Uncore Min Frequency (I/O)", Values: []string{uncoreMinMaxDieFrequencyFromOutput(false, false, outputs)}}, + {Name: "Uncore Max Frequency (Compute)", Values: []string{uncoreMinMaxDieFrequencyFromOutput(true, true, outputs)}}, + {Name: "Uncore Max Frequency (I/O)", Values: []string{uncoreMinMaxDieFrequencyFromOutput(true, false, outputs)}}, + }...) + } else { + fields = append(fields, []Field{ + {Name: "Uncore Max Frequency (GHz)", Values: []string{uncoreMaxFrequencyFromOutput(outputs)}}, + {Name: "Uncore Min Frequency (GHz)", Values: []string{uncoreMinFrequencyFromOutput(outputs)}}, + }...) + } + fields = append(fields, []Field{ {Name: "Energy Performance Bias", Values: []string{epbFromOutput(outputs)}}, {Name: "Energy Performance Preference", Values: []string{eppFromOutput(outputs)}}, {Name: "Scaling Governor", Values: []string{strings.TrimSpace(outputs[script.ScalingGovernorScriptName].Stdout)}}, {Name: "Efficiency Latency Control", Values: []string{elcSummaryFromOutput(outputs)}}, - } + }...) + + return fields } // benchmarking diff --git a/internal/report/table_helpers.go b/internal/report/table_helpers.go index 1f4718ea..ba30d5e6 100644 --- a/internal/report/table_helpers.go +++ b/internal/report/table_helpers.go @@ -673,57 +673,82 @@ func tdpFromOutput(outputs map[string]script.ScriptOutput) string { return fmt.Sprint(msr/8) + "W" } -func uncoreMinMaxFrequencyFromOutput(maxFreq bool, outputs map[string]script.ScriptOutput) string { - uarch := uarchFromOutput(outputs) - if uarch == "" { - slog.Error("failed to get uarch from script outputs") +func uncoreMinMaxDieFrequencyFromOutput(maxFreq bool, computeDie bool, outputs map[string]script.ScriptOutput) string { + // find the first die that matches requrested die type (compute or I/O) + re := regexp.MustCompile(`Read bits \d+:\d+ value (\d+) from TPMI ID .* for entry (\d+) in instance (\d+)`) + var instance, entry string + found := false + for _, line := range strings.Split(outputs[script.UncoreDieTypesFromTPMIScriptName].Stdout, "\n") { + match := re.FindStringSubmatch(line) + if match == nil { + continue + } + if computeDie && match[1] == "0" { + found = true + entry = match[2] + instance = match[3] + break + } + if !computeDie && match[1] == "1" { + found = true + entry = match[2] + instance = match[3] + break + } + } + if !found { + slog.Error("failed to find uncore die type in TPMI output", slog.String("output", outputs[script.UncoreDieTypesFromTPMIScriptName].Stdout)) return "" } + // get the frequency for the found die + re = regexp.MustCompile(fmt.Sprintf(`Read bits \d+:\d+ value (\d+) from TPMI ID .* for entry %s in instance %s`, entry, instance)) + found = false var parsed int64 var err error - if strings.Contains(uarch, "SRF") || strings.Contains(uarch, "GNR") { - re := regexp.MustCompile(`Read bits \d+:\d+ value (\d+) from TPMI ID .* for entry 0`) - found := false - var scriptName string - if maxFreq { - scriptName = script.UncoreMaxFromTPMIScriptName - } else { - scriptName = script.UncoreMinFromTPMIScriptName - } - for _, line := range strings.Split(outputs[scriptName].Stdout, "\n") { - match := re.FindStringSubmatch(line) - if len(match) > 0 { - found = true - parsed, err = strconv.ParseInt(match[1], 10, 64) - if err != nil { - slog.Error("failed to parse uncore frequency", slog.String("error", err.Error()), slog.String("line", line)) - return "" - } - break - } - } - if !found { - slog.Error("failed to find uncore frequency in TPMI output", slog.String("output", outputs[scriptName].Stdout)) - return "" - } + var scriptName string + if maxFreq { + scriptName = script.UncoreMaxFromTPMIScriptName } else { - var scriptName string - if maxFreq { - scriptName = script.UncoreMaxFromMSRScriptName - } else { - scriptName = script.UncoreMinFromMSRScriptName - } - hex := strings.TrimSpace(outputs[scriptName].Stdout) - if hex != "" && hex != "0" { - parsed, err = strconv.ParseInt(hex, 16, 64) + scriptName = script.UncoreMinFromTPMIScriptName + } + for _, line := range strings.Split(outputs[scriptName].Stdout, "\n") { + match := re.FindStringSubmatch(line) + if len(match) > 0 { + found = true + parsed, err = strconv.ParseInt(match[1], 10, 64) if err != nil { - slog.Error("failed to parse uncore frequency", slog.String("error", err.Error()), slog.String("hex", hex)) + slog.Error("failed to parse uncore frequency", slog.String("error", err.Error()), slog.String("line", line)) return "" } - } else { - slog.Warn("failed to get uncore frequency from MSR", slog.String("hex", hex)) + break + } + } + if !found { + slog.Error("failed to find uncore frequency in TPMI output", slog.String("output", outputs[scriptName].Stdout)) + return "" + } + return fmt.Sprintf("%.1fGHz", float64(parsed)/10) +} + +func uncoreMinMaxFrequencyFromOutput(maxFreq bool, outputs map[string]script.ScriptOutput) string { + var parsed int64 + var err error + var scriptName string + if maxFreq { + scriptName = script.UncoreMaxFromMSRScriptName + } else { + scriptName = script.UncoreMinFromMSRScriptName + } + hex := strings.TrimSpace(outputs[scriptName].Stdout) + if hex != "" && hex != "0" { + parsed, err = strconv.ParseInt(hex, 16, 64) + if err != nil { + slog.Error("failed to parse uncore frequency", slog.String("error", err.Error()), slog.String("hex", hex)) return "" } + } else { + slog.Warn("failed to get uncore frequency from MSR", slog.String("hex", hex)) + return "" } return fmt.Sprintf("%.1fGHz", float64(parsed)/10) } diff --git a/internal/script/script_defs.go b/internal/script/script_defs.go index 4d13fa88..0bc7e6f5 100644 --- a/internal/script/script_defs.go +++ b/internal/script/script_defs.go @@ -81,6 +81,7 @@ const ( UncoreMinFromMSRScriptName = "uncore min from msr" UncoreMaxFromTPMIScriptName = "uncore max from tpmi" UncoreMinFromTPMIScriptName = "uncore min from tpmi" + UncoreDieTypesFromTPMIScriptName = "uncore die types from tpmi" ElcScriptName = "efficiency latency control" SstTfHighPriorityCoreFrequenciesScriptName = "sst tf high priority core frequencies" SstTfLowPriorityCoreFrequenciesScriptName = "sst tf low priority core frequencies" @@ -425,7 +426,8 @@ rdmsr 0x1ad # MSR_TURBO_RATIO_LIMIT: Maximum Ratio Limit of Turbo Mode Name: UncoreMaxFromTPMIScriptName, Script: "pcm-tpmi 2 0x18 -d -b 8:14", Architectures: []string{x86_64}, - Families: []string{"6"}, // Intel + Families: []string{"6"}, // Intel + Models: []string{"173", "175"}, // GNR, SRF Depends: []string{"pcm-tpmi"}, Superuser: true, }, @@ -433,7 +435,17 @@ rdmsr 0x1ad # MSR_TURBO_RATIO_LIMIT: Maximum Ratio Limit of Turbo Mode Name: UncoreMinFromTPMIScriptName, Script: "pcm-tpmi 2 0x18 -d -b 15:21", Architectures: []string{x86_64}, - Families: []string{"6"}, // Intel + Families: []string{"6"}, // Intel + Models: []string{"173", "175"}, // GNR, SRF + Depends: []string{"pcm-tpmi"}, + Superuser: true, + }, + { + Name: UncoreDieTypesFromTPMIScriptName, + Script: "pcm-tpmi 2 0x10 -d -b 26:26", + Architectures: []string{x86_64}, + Families: []string{"6"}, // Intel + Models: []string{"173", "175"}, // GNR, SRF Depends: []string{"pcm-tpmi"}, Superuser: true, }, @@ -506,7 +518,8 @@ for die in "${!die_types[@]}"; do done `, Architectures: []string{x86_64}, - Families: []string{"6"}, // Intel + Families: []string{"6"}, // Intel + Models: []string{"173", "175"}, // GNR, SRF Depends: []string{"pcm-tpmi"}, Superuser: true, },