Skip to content
Snippets Groups Projects
Commit 611d9a95 authored by James Morse's avatar James Morse
Browse files

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: default avatarJames Morse <james.morse@arm.com>
parent 8ada8f11
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment