Skip to content

Commit 036a758

Browse files
Bhaskara Budiredlawilldeacon
authored andcommitted
drivers: perf: Add LLC-TAD perf counter support
This driver adds support for Last-level cache tag-and-data unit (LLC-TAD) PMU that is featured in some of the Marvell's CN10K infrastructure silicons. The LLC is divided into 2N slices distributed across N Mesh tiles in a single-socket configuration. The driver always configures the same counter for all of the TADs. The user would end up effectively reserving one of eight counters in every TAD to look across all TADs. The occurrences of events are aggregated and presented to the user at the end of an application run. The driver does not provide a way for the user to partition TADs so that different TADs are used for different applications. The event counters are zeroed to start event counting to avoid any rollover issues. TAD perf counters are 64-bit, so it's not currently possible to overflow event counters at current mesh and core frequencies. To measure tad pmu events use perf tool stat command. For instance: perf stat -e tad_dat_msh_in_dss,tad_req_msh_out_any <application> perf stat -e tad_alloc_any,tad_hit_any,tad_tag_rd <application> Signed-off-by: Bhaskara Budiredla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent d58071a commit 036a758

File tree

3 files changed

+437
-0
lines changed

3 files changed

+437
-0
lines changed

drivers/perf/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ config ARM_DMC620_PMU
139139
Support for PMU events monitoring on the ARM DMC-620 memory
140140
controller.
141141

142+
config MARVELL_CN10K_TAD_PMU
143+
tristate "Marvell CN10K LLC-TAD PMU"
144+
depends on ARM64 || (COMPILE_TEST && 64BIT)
145+
help
146+
Provides support for Last-Level cache Tag-and-data Units (LLC-TAD)
147+
performance monitors on CN10K family silicons.
148+
142149
source "drivers/perf/hisilicon/Kconfig"
143150

144151
endmenu

drivers/perf/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ obj-$(CONFIG_THUNDERX2_PMU) += thunderx2_pmu.o
1414
obj-$(CONFIG_XGENE_PMU) += xgene_pmu.o
1515
obj-$(CONFIG_ARM_SPE_PMU) += arm_spe_pmu.o
1616
obj-$(CONFIG_ARM_DMC620_PMU) += arm_dmc620_pmu.o
17+
obj-$(CONFIG_MARVELL_CN10K_TAD_PMU) += marvell_cn10k_tad_pmu.o

0 commit comments

Comments
 (0)