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

fs/resctrl: Export the closid/rmid to user-space


Control and monitor groups have a CLOSID and/or RMID that is used to
count the cache usage and memory bandwidth of tasks in this group.

Not all of MPAMs counters can be exposed via resctrl, as each counter
also needs a monitor to be allocated. It is unlikely there are enough
monitors for every RMID to have a monitor permanently allocated.

To allow counters to be read via perf, the RMID that a control
or monitor group is using needs exposing to user-space. This can be
passed back to perf as a parameter. MPAM's PMG values are not
unique, the PARTID needs to be provided too. Perf allows a number of
u64 arguments, which is not enough to encode a control/monitor group
name.

Similarly, there has been some interest in allowing cgroup to manage
the tasks file for resctrl. Exposing a unique identifier for each
control or monitor group will allow cgroups to point to a resctrl
group that holds its configuration.

Provide a file in each control or monitor group that returns a unique
identifier. When passed back to the kernel, resctrl can decode this
into a closid/rmid, or just identify the control or monitor group.

The value is xor'd with a value picked at boot as obsfucation. This
is to prevent user-space from relying on the layout of this field,
or re-using values between boots of the system. This is to allow the
kernel to change the layout of this field in the future.

Signed-off-by: default avatarJames Morse <james.morse@arm.com>
parent 42fc5a24
No related branches found
Tags v5.15-rc3
No related merge requests found
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