tools/power/x86/intel-speed-select: Display core count for bucket
Read the bucket and core count relationship via MSR and display when displaying turbo ratio limits. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
92e0e87d0b
commit
1233c7b95c
3 changed files with 26 additions and 3 deletions
|
@ -188,6 +188,24 @@ int isst_get_get_trl(int cpu, int level, int avx_level, int *trl)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int isst_get_trl_bucket_info(int cpu, unsigned long long *buckets_info)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
debug_printf("cpu:%d bucket info via MSR\n", cpu);
|
||||||
|
|
||||||
|
*buckets_info = 0;
|
||||||
|
|
||||||
|
ret = isst_send_msr_command(cpu, 0x1ae, 0, buckets_info);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
debug_printf("cpu:%d bucket info via MSR successful 0x%llx\n", cpu,
|
||||||
|
*buckets_info);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int isst_set_tdp_level_msr(int cpu, int tdp_level)
|
int isst_set_tdp_level_msr(int cpu, int tdp_level)
|
||||||
{
|
{
|
||||||
unsigned long long level = tdp_level;
|
unsigned long long level = tdp_level;
|
||||||
|
@ -563,6 +581,10 @@ int isst_get_process_ctdp(int cpu, int tdp_level, struct isst_pkg_ctdp *pkg_dev)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
ret = isst_get_trl_bucket_info(cpu, &ctdp_level->buckets_info);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
ret = isst_get_get_trl(cpu, i, 0,
|
ret = isst_get_get_trl(cpu, i, 0,
|
||||||
ctdp_level->trl_sse_active_cores);
|
ctdp_level->trl_sse_active_cores);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
@ -372,7 +372,7 @@ void isst_ctdp_display_information(int cpu, FILE *outf, int tdp_level,
|
||||||
format_and_print(outf, base_level + 5, header, NULL);
|
format_and_print(outf, base_level + 5, header, NULL);
|
||||||
|
|
||||||
snprintf(header, sizeof(header), "core-count");
|
snprintf(header, sizeof(header), "core-count");
|
||||||
snprintf(value, sizeof(value), "%d", j);
|
snprintf(value, sizeof(value), "%llu", (ctdp_level->buckets_info >> (j * 8)) & 0xff);
|
||||||
format_and_print(outf, base_level + 6, header, value);
|
format_and_print(outf, base_level + 6, header, value);
|
||||||
|
|
||||||
snprintf(header, sizeof(header),
|
snprintf(header, sizeof(header),
|
||||||
|
@ -389,7 +389,7 @@ void isst_ctdp_display_information(int cpu, FILE *outf, int tdp_level,
|
||||||
format_and_print(outf, base_level + 5, header, NULL);
|
format_and_print(outf, base_level + 5, header, NULL);
|
||||||
|
|
||||||
snprintf(header, sizeof(header), "core-count");
|
snprintf(header, sizeof(header), "core-count");
|
||||||
snprintf(value, sizeof(value), "%d", j);
|
snprintf(value, sizeof(value), "%llu", (ctdp_level->buckets_info >> (j * 8)) & 0xff);
|
||||||
format_and_print(outf, base_level + 6, header, value);
|
format_and_print(outf, base_level + 6, header, value);
|
||||||
|
|
||||||
snprintf(header, sizeof(header),
|
snprintf(header, sizeof(header),
|
||||||
|
@ -407,7 +407,7 @@ void isst_ctdp_display_information(int cpu, FILE *outf, int tdp_level,
|
||||||
format_and_print(outf, base_level + 5, header, NULL);
|
format_and_print(outf, base_level + 5, header, NULL);
|
||||||
|
|
||||||
snprintf(header, sizeof(header), "core-count");
|
snprintf(header, sizeof(header), "core-count");
|
||||||
snprintf(value, sizeof(value), "%d", j);
|
snprintf(value, sizeof(value), "%llu", (ctdp_level->buckets_info >> (j * 8)) & 0xff);
|
||||||
format_and_print(outf, base_level + 6, header, value);
|
format_and_print(outf, base_level + 6, header, value);
|
||||||
|
|
||||||
snprintf(header, sizeof(header),
|
snprintf(header, sizeof(header),
|
||||||
|
|
|
@ -134,6 +134,7 @@ struct isst_pkg_ctdp_level_info {
|
||||||
size_t core_cpumask_size;
|
size_t core_cpumask_size;
|
||||||
cpu_set_t *core_cpumask;
|
cpu_set_t *core_cpumask;
|
||||||
int cpu_count;
|
int cpu_count;
|
||||||
|
unsigned long long buckets_info;
|
||||||
int trl_sse_active_cores[ISST_TRL_MAX_ACTIVE_CORES];
|
int trl_sse_active_cores[ISST_TRL_MAX_ACTIVE_CORES];
|
||||||
int trl_avx_active_cores[ISST_TRL_MAX_ACTIVE_CORES];
|
int trl_avx_active_cores[ISST_TRL_MAX_ACTIVE_CORES];
|
||||||
int trl_avx_512_active_cores[ISST_TRL_MAX_ACTIVE_CORES];
|
int trl_avx_512_active_cores[ISST_TRL_MAX_ACTIVE_CORES];
|
||||||
|
|
Loading…
Reference in a new issue