-
- Downloads
drivers/perf: Add PMU to support reading resctrl counters via perf
Resctrl exposes the cache opccupancy and bandwidth counters to user space
via files. Each control and monitor group has a copy of these files, and
can read the counter by reading the file.
MPAM needs to allocate a hardware monitor to do the counting work, and
there may not be enough for every control and monitor group to have one.
MPAM needs some indication of which counters are currently in use, it
needs to be able to reject additional users if there are not enough
monitors.
Add a PMU driver for resctrl. This never touches the hardware directly,
it only uses the resctrl API to retrieve the counter values. The PMU
supports the same events as resctrl. The event parameters are the domain
id, which user-space already understands, and the control or monitor
group id. The group id is a 64bit field provided by resctrl that can
be used in the kernel to retrieve the group. Currently this encodes
the CLOSID and RMID.
Signed-off-by:
James Morse <james.morse@arm.com>
Showing
- drivers/perf/Kconfig 7 additions, 0 deletionsdrivers/perf/Kconfig
- drivers/perf/Makefile 1 addition, 0 deletionsdrivers/perf/Makefile
- drivers/perf/resctrl_pmu.c 393 additions, 0 deletionsdrivers/perf/resctrl_pmu.c
- fs/resctrl/rdtgroup.c 10 additions, 0 deletionsfs/resctrl/rdtgroup.c
- include/linux/resctrl_types.h 1 addition, 0 deletionsinclude/linux/resctrl_types.h
Loading
Please register or sign in to comment