Skip to content

Commit 041e975

Browse files
committed
tools/power turbostat: Rename "LLCkRPS" column to "LLCMRPS"
The purpose of the LLC References per Second LLC column is to qualify the significance of the LLC%hit column. If RPS is high, then the hit rate matters. If RPS is low, then the hit rate is not significant. Remove unnecessary and distracting precision in the RPS column by dividing my a million rather than by a thousand. Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 785953c commit 041e975

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

tools/power/x86/turbostat/turbostat.8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ The system configuration dump (if --quiet is not used) is followed by statistics
161161
.PP
162162
\fBSMI\fP The number of System Management Interrupts serviced CPU during the measurement interval. While this counter is actually per-CPU, SMI are triggered on all processors, so the number should be the same for all CPUs.
163163
.PP
164-
\fBLLCkRPS\fP Last Level Cache Thousands of References Per Second. For CPUs with an L3 LLC, this is the number of references that CPU made to the L3 (and the number of misses that CPU made to it's L2). For CPUs with an L2 LLC, this is the number of references to the L2 (and the number of misses to the CPU's L1). The system summary row shows the sum for all CPUs. In both cases, the value displayed is the actual value divided by 1000 in the interest of usually fitting into 8 columns.
164+
\fBLLCMRPS\fP Last Level Cache Millions of References Per Second. For CPUs with an L3 LLC, this is the number of references that CPU made to the L3 (and the number of misses that CPU made to it's L2). For CPUs with an L2 LLC, this is the number of references to the L2 (and the number of misses to the CPU's L1). The system summary row shows the sum for all CPUs. In both cases, the value displayed is the actual value divided by 1,000,000. If this value is large, then the LLC%hit column is significant. If this value is small, then the LLC%hit column is not significant.
165165
.PP
166166
\fBLLC%hit\fP Last Level Cache Hit Rate %. Hit Rate Percent = 100.0 * (References - Misses)/References. The system summary row shows the weighted average for all CPUs (100.0 * (Sum_References - Sum_Misses)/Sum_References).
167167
.PP

tools/power/x86/turbostat/turbostat.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ struct msr_counter bic[] = {
210210
{ 0x0, "NMI", NULL, 0, 0, 0, NULL, 0 },
211211
{ 0x0, "CPU%c1e", NULL, 0, 0, 0, NULL, 0 },
212212
{ 0x0, "pct_idle", NULL, 0, 0, 0, NULL, 0 },
213-
{ 0x0, "LLCkRPS", NULL, 0, 0, 0, NULL, 0 },
213+
{ 0x0, "LLCMRPS", NULL, 0, 0, 0, NULL, 0 },
214214
{ 0x0, "LLC%hit", NULL, 0, 0, 0, NULL, 0 },
215215
};
216216

@@ -281,7 +281,7 @@ enum bic_names {
281281
BIC_NMI,
282282
BIC_CPU_c1e,
283283
BIC_pct_idle,
284-
BIC_LLC_RPS,
284+
BIC_LLC_MRPS,
285285
BIC_LLC_HIT,
286286
MAX_BIC
287287
};
@@ -424,7 +424,7 @@ static void bic_groups_init(void)
424424
SET_BIC(BIC_pct_idle, &bic_group_idle);
425425

426426
BIC_INIT(&bic_group_cache);
427-
SET_BIC(BIC_LLC_RPS, &bic_group_cache);
427+
SET_BIC(BIC_LLC_MRPS, &bic_group_cache);
428428
SET_BIC(BIC_LLC_HIT, &bic_group_cache);
429429

430430
BIC_INIT(&bic_group_other);
@@ -2440,7 +2440,7 @@ static void bic_disable_msr_access(void)
24402440
static void bic_disable_perf_access(void)
24412441
{
24422442
CLR_BIC(BIC_IPC, &bic_enabled);
2443-
CLR_BIC(BIC_LLC_RPS, &bic_enabled);
2443+
CLR_BIC(BIC_LLC_MRPS, &bic_enabled);
24442444
CLR_BIC(BIC_LLC_HIT, &bic_enabled);
24452445
}
24462446

@@ -2814,8 +2814,8 @@ void print_header(char *delim)
28142814
if (DO_BIC(BIC_SMI))
28152815
outp += sprintf(outp, "%sSMI", (printed++ ? delim : ""));
28162816

2817-
if (DO_BIC(BIC_LLC_RPS))
2818-
outp += sprintf(outp, "%sLLCkRPS", (printed++ ? delim : ""));
2817+
if (DO_BIC(BIC_LLC_MRPS))
2818+
outp += sprintf(outp, "%sLLCMRPS", (printed++ ? delim : ""));
28192819

28202820
if (DO_BIC(BIC_LLC_HIT))
28212821
outp += sprintf(outp, "%sLLC%%hit", (printed++ ? delim : ""));
@@ -3306,9 +3306,9 @@ int format_counters(PER_THREAD_PARAMS)
33063306
outp += sprintf(outp, "%s%d", (printed++ ? delim : ""), t->smi_count);
33073307

33083308
/* LLC Stats */
3309-
if (DO_BIC(BIC_LLC_RPS) || DO_BIC(BIC_LLC_HIT)) {
3310-
if (DO_BIC(BIC_LLC_RPS))
3311-
outp += sprintf(outp, "%s%.0f", (printed++ ? delim : ""), t->llc.references / interval_float / 1000);
3309+
if (DO_BIC(BIC_LLC_MRPS) || DO_BIC(BIC_LLC_HIT)) {
3310+
if (DO_BIC(BIC_LLC_MRPS))
3311+
outp += sprintf(outp, "%s%.0f", (printed++ ? delim : ""), t->llc.references / interval_float / 1000000);
33123312

33133313
if (DO_BIC(BIC_LLC_HIT))
33143314
outp += sprintf(outp, fmt8, (printed++ ? delim : ""), pct((t->llc.references - t->llc.misses), t->llc.references));
@@ -3855,7 +3855,7 @@ int delta_thread(struct thread_data *new, struct thread_data *old, struct core_d
38553855
if (DO_BIC(BIC_SMI))
38563856
old->smi_count = new->smi_count - old->smi_count;
38573857

3858-
if (DO_BIC(BIC_LLC_RPS))
3858+
if (DO_BIC(BIC_LLC_MRPS))
38593859
old->llc.references = new->llc.references - old->llc.references;
38603860

38613861
if (DO_BIC(BIC_LLC_HIT))
@@ -5067,7 +5067,7 @@ int get_counters(PER_THREAD_PARAMS)
50675067

50685068
get_smi_aperf_mperf(cpu, t);
50695069

5070-
if (DO_BIC(BIC_LLC_RPS) || DO_BIC(BIC_LLC_HIT))
5070+
if (DO_BIC(BIC_LLC_MRPS) || DO_BIC(BIC_LLC_HIT))
50715071
get_perf_llc_stats(cpu, &t->llc);
50725072

50735073
if (DO_BIC(BIC_IPC))
@@ -8344,7 +8344,7 @@ void linux_perf_init(void)
83448344
if (fd_instr_count_percpu == NULL)
83458345
err(-1, "calloc fd_instr_count_percpu");
83468346
}
8347-
if (BIC_IS_ENABLED(BIC_LLC_RPS)) {
8347+
if (BIC_IS_ENABLED(BIC_LLC_MRPS)) {
83488348
fd_llc_percpu = calloc(topo.max_cpu_num + 1, sizeof(int));
83498349
if (fd_llc_percpu == NULL)
83508350
err(-1, "calloc fd_llc_percpu");
@@ -9066,7 +9066,7 @@ void perf_llc_init(void)
90669066

90679067
if (no_perf)
90689068
return;
9069-
if (!(BIC_IS_ENABLED(BIC_LLC_RPS) && BIC_IS_ENABLED(BIC_LLC_HIT)))
9069+
if (!(BIC_IS_ENABLED(BIC_LLC_MRPS) && BIC_IS_ENABLED(BIC_LLC_HIT)))
90709070
return;
90719071

90729072
for (cpu = 0; cpu <= topo.max_cpu_num; ++cpu) {
@@ -9089,7 +9089,7 @@ void perf_llc_init(void)
90899089
return;
90909090
}
90919091
}
9092-
BIC_PRESENT(BIC_LLC_RPS);
9092+
BIC_PRESENT(BIC_LLC_MRPS);
90939093
BIC_PRESENT(BIC_LLC_HIT);
90949094
}
90959095

@@ -9518,7 +9518,7 @@ void check_perf_access(void)
95189518
if (!has_perf_instr_count_access())
95199519
no_perf = 1;
95209520

9521-
if (BIC_IS_ENABLED(BIC_LLC_RPS) || BIC_IS_ENABLED(BIC_LLC_HIT))
9521+
if (BIC_IS_ENABLED(BIC_LLC_MRPS) || BIC_IS_ENABLED(BIC_LLC_HIT))
95229522
if (!has_perf_llc_access())
95239523
no_perf = 1;
95249524

0 commit comments

Comments
 (0)