* [PATCH 1/2] tools/power/x86/intel-speed-select: Fix display for turbo-freq auto mode
@ 2020-01-31 5:45 Srinivas Pandruvada
2020-01-31 5:45 ` [PATCH 2/2] tools/power/x86/intel-speed-select: Avoid duplicate names for json parsing Srinivas Pandruvada
0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Pandruvada @ 2020-01-31 5:45 UTC (permalink / raw)
To: andy; +Cc: platform-driver-x86, linux-kernel, Srinivas Pandruvada
When mailbox command for the turbo-freq enable fails, then don't display
result for auto-mode. When turbo-freq enable fails, there is no point
to set CPU priorities.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
tools/power/x86/intel-speed-select/isst-config.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c
index c74b776adc61..7893ad2c34ab 100644
--- a/tools/power/x86/intel-speed-select/isst-config.c
+++ b/tools/power/x86/intel-speed-select/isst-config.c
@@ -43,6 +43,7 @@ static int out_format_json;
static int cmd_help;
static int force_online_offline;
static int auto_mode;
+static int fact_enable_fail;
/* clos related */
static int current_clos = -1;
@@ -1581,6 +1582,8 @@ static void set_fact_for_cpu(int cpu, void *arg1, void *arg2, void *arg3,
disp_results:
if (status) {
isst_display_result(cpu, outf, "turbo-freq", "enable", ret);
+ if (ret)
+ fact_enable_fail = ret;
} else {
/* Since we modified TRL during Fact enable, restore it */
isst_set_trl_from_current_tdp(cpu, fact_trl);
@@ -1622,7 +1625,7 @@ static void set_fact_enable(int arg)
NULL, &enable);
isst_ctdp_display_information_end(outf);
- if (enable && auto_mode) {
+ if (!fact_enable_fail && enable && auto_mode) {
/*
* When we adjust CLOS param, we have to set for siblings also.
* So for the each user specified CPU, also add the sibling
--
2.24.1
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 2/2] tools/power/x86/intel-speed-select: Avoid duplicate names for json parsing
2020-01-31 5:45 [PATCH 1/2] tools/power/x86/intel-speed-select: Fix display for turbo-freq auto mode Srinivas Pandruvada
@ 2020-01-31 5:45 ` Srinivas Pandruvada
0 siblings, 0 replies; 2+ messages in thread
From: Srinivas Pandruvada @ 2020-01-31 5:45 UTC (permalink / raw)
To: andy; +Cc: platform-driver-x86, linux-kernel, Srinivas Pandruvada
For the command
"intel-speed-select perf-profile info":
There are two instances of “speed-select-turbo-freq” underneath
“perf-profile-level-0” for each package. When we load the output into
python with json.load(), the second instance overwrites the first.
Result is that we can only access:
"speed-select-turbo-freq": {
"bucket-0": {
"high-priority-cores-count": "2",
"high-priority-max-frequency(MHz)": "3000",
"high-priority-max-avx2-frequency(MHz)": "2800",
"high-priority-max-avx512-frequency(MHz)": "2600"
},
Because it is a duplicate of "speed-select-turbo-freq": "disabled"
Same is true for "speed-select-base-freq".
To avoid this add "-properties" suffix for the second instance to
differentiate.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
tools/power/x86/intel-speed-select/isst-display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/power/x86/intel-speed-select/isst-display.c b/tools/power/x86/intel-speed-select/isst-display.c
index 4fb0c1d49d64..3d70be2a9f61 100644
--- a/tools/power/x86/intel-speed-select/isst-display.c
+++ b/tools/power/x86/intel-speed-select/isst-display.c
@@ -178,7 +178,7 @@ static void _isst_pbf_display_information(int cpu, FILE *outf, int level,
char header[256];
char value[256];
- snprintf(header, sizeof(header), "speed-select-base-freq");
+ snprintf(header, sizeof(header), "speed-select-base-freq-properties");
format_and_print(outf, disp_level, header, NULL);
snprintf(header, sizeof(header), "high-priority-base-frequency(MHz)");
@@ -224,7 +224,7 @@ static void _isst_fact_display_information(int cpu, FILE *outf, int level,
char value[256];
int j;
- snprintf(header, sizeof(header), "speed-select-turbo-freq");
+ snprintf(header, sizeof(header), "speed-select-turbo-freq-properties");
format_and_print(outf, base_level, header, NULL);
for (j = 0; j < ISST_FACT_MAX_BUCKETS; ++j) {
if (fact_bucket != 0xff && fact_bucket != j)
--
2.24.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-31 5:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31 5:45 [PATCH 1/2] tools/power/x86/intel-speed-select: Fix display for turbo-freq auto mode Srinivas Pandruvada
2020-01-31 5:45 ` [PATCH 2/2] tools/power/x86/intel-speed-select: Avoid duplicate names for json parsing Srinivas Pandruvada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®