Re: [PATCH v11 14/23] x86/resctrl: Enforce system RMID limit on AET event groups

From: Luck, Tony

Date: Mon Sep 14 2026 - 17:34:59 EST


On Wed, Sep 09, 2026 at 09:05:28PM -0700, Reinette Chatre wrote:
> Hi Tony,
>
> On 8/31/26 10:44 AM, Tony Luck wrote:
> > AET (Application Energy Telemetry) event groups each support a specific
> > number of RMIDs. But that number may be lower than the number supported
> > by the system. This is especially true on systems with SNC (Sub-NUMA Cluster)
> > enabled as that reduces the number of supported RMIDs.
> >
> > Reduce all event_group::num_rmid to system maximum.
>
> Why is this needed? Doesn't resctrl_arch_system_num_rmid_idx() ensure the
> minimum is taken across all resources? I do not see why a resource needs to
> artificially reduce the number of RMIDs it supports.

rdt_resources_all[RDT_RESOURCE_PERF_PKG].r_resctrl.mon.num_rmid is used
to display the value in /sys/fs/resctrl/info/PERF_PKG_MON/num_rmids.

It would cause confusion if a number > (CPUID(0xF,0x0).EBX + 1) appeared
there.

E.g. suppose AET is the only enabled monitor resource, and that you are
running on a low-end CPU sku with fewer cores so the number of RMIDs
supported in IA32_PQR_ASSOC is scaled back because of fewer cores.

AET will claim that 576 RMIDs are supported for the energy event. The
user would see 576 in /sys/fs/resctrl/info/PERF_PKG_MON/num_rmids.
But mkdir for monitoring directories would fail before that many
MON directories could be created.
>
> Reinette
>

-Tony