Re: [PATCH v3 26/26] x86/resctrl: Update Documentation for package events

Reinette Chatre
2025-04-19T05:40:54Z

Hi Tony,

On 4/7/25 4:40 PM, Tony Luck wrote:
> Each "mon_data" directory is now divided between L3 events and package
> events.
>
> The "info/PERF_PKG_MON" directory contains parameters for perf events.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
> Documentation/filesystems/resctrl.rst | 38 ++++++++++++++++++++-------
> 1 file changed, 28 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst
> index 6768fc1fad16..b89a188b0321 100644
> --- a/Documentation/filesystems/resctrl.rst
> +++ b/Documentation/filesystems/resctrl.rst
> @@ -167,7 +167,7 @@ with respect to allocation:
> bandwidth percentages are directly applied to
> the threads running on the core
>
> -If RDT monitoring is available there will be an "L3_MON" directory
> +If RDT L3 monitoring is available there will be an "L3_MON" directory

I think "RDT" can just be dropped.

> with the following files:
>
> "num_rmids":
> @@ -261,6 +261,17 @@ with the following files:
> bytes) at which a previously used LLC_occupancy
> counter can be considered for re-use.
>
> +If RDT PERF monitoring is available there will be an "L3_PERF_PKG" directory

"L3_PERF_PKG" -> "PERF_PKG_MON" ?

I understand that the existing L3 documentation contains this term but I do not
see a reason why the documentation should make this new monitoring Intel/RDT specific.

Also, I do not think user can be expected to know what "perf monitoring" is.

> +with the following files:
> +
> +"num_rmids":
> + The guaranteed number of hardware countes supporting RMIDs.

countes -> counters?

The use of "hardware counters" is a bit unexpected ... the series did not mention
this or I must have missed this.

> + If more "CTRL_MON" + "MON" groups than this number are created,
> + the system may report that counters are "unavailable" when read.

To be precise it is "Unavailable" ... but I do not think that is a good interface.

> +
> +"mon_features":
> + Lists the perf monitoring events that are enabled on this system.

"PERF" (all caps) at top and "perf" lower case here?

> +
> Finally, in the top level of the "info" directory there is a file
> named "last_cmd_status". This is reset with every "command" issued
> via the file system (making new directories or writing to any of the
> @@ -366,15 +377,22 @@ When control is enabled all CTRL_MON groups will also contain:
> When monitoring is enabled all MON groups will also contain:
>
> "mon_data":
> - This contains a set of files organized by L3 domain and by
> - RDT event. E.g. on a system with two L3 domains there will
> - be subdirectories "mon_L3_00" and "mon_L3_01". Each of these
> - directories have one file per event (e.g. "llc_occupancy",
> - "mbm_total_bytes", and "mbm_local_bytes"). In a MON group these
> - files provide a read out of the current value of the event for
> - all tasks in the group. In CTRL_MON groups these files provide
> - the sum for all tasks in the CTRL_MON group and all tasks in
> - MON groups. Please see example section for more details on usage.
> + This contains a set of directories, one for each instance
> + of an L3 cache, or of a processor package. The L3 cache
> + directories are named "mon_L3_00", "mon_L3_01" etc. The
> + package directories "mon_PERF_PKG_00", "mon_PERF_PKG_01" etc.
> +
> + Within each directory there is one file per event. In
> + the L3 directories: "llc_occupancy", "mbm_total_bytes",
> + and "mbm_local_bytes". In the PERF_PKG directories: "core_energy",

stray tab here

> + "activity", etc.
> +
> + In a MON group these files provide a read out of the current
> + value of the event for all tasks in the group. In CTRL_MON groups
> + these files provide the sum for all tasks in the CTRL_MON group
> + and all tasks in MON groups. Please see example section for more
> + details on usage.
> +
> On systems with Sub-NUMA Cluster (SNC) enabled there are extra
> directories for each node (located within the "mon_L3_XX" directory
> for the L3 cache they occupy). These are named "mon_sub_L3_YY"

Reinette