Re: [PATCH v12 10/25] x86/resctrl: Honor rdt=perf option to force enable AET perf events

From: Reinette Chatre

Date: Thu Sep 24 2026 - 11:46:17 EST


Hi Tony,

The subject is specific to "rdt=perf" and "AET perf events" but seems to apply
to energy also?

On 9/16/26 4:13 PM, Tony Luck wrote:
> resctrl can disable ("force_off") a feature supported by the platform if,
> for example, there is an erratum related to the feature or, in the case of AET
> (Application Energy Telemetry), when the event group has insufficient RMIDs. The
> "rdt=" kernel command line option lets the user override ("force_on") when
> a feature is disabled in such case. Users may also disable ("force_off")
> individual supported resctrl features they do not need.
>
> Linux enumerates AET once on first mount and skips this enumeration if
> the associated event group is supported but disabled. Since AET is only
> enumerated once, this check is guaranteed to only consider disabling via
> the rdt= kernel parameter.
>
> However, when transitioning to enumerate AET on every mount, it is no longer
> correct to skip enumeration simply because an event group is marked as
> disabled. It is then possible for resctrl to have force-disabled the event
> group during an earlier enumeration due to insufficient RMIDs, which would
> improperly cause the kernel to ignore a user's explicit rdt= override on
> subsequent mounts.
>
> Ensure the user's command line choices take precedence over system-level limits.
>
> Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
> ---
> v12:
> No change
> ---
> arch/x86/kernel/cpu/resctrl/intel_aet.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/resctrl/intel_aet.c b/arch/x86/kernel/cpu/resctrl/intel_aet.c
> index c22c3cf5167d..4ad6ad78e93e 100644
> --- a/arch/x86/kernel/cpu/resctrl/intel_aet.c
> +++ b/arch/x86/kernel/cpu/resctrl/intel_aet.c
> @@ -228,7 +228,7 @@ static bool enable_events(struct event_group *e, struct pmt_feature_group *p)
> struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_PERF_PKG].r_resctrl;
> int skipped_events = 0;
>
> - if (e->force_off)
> + if (e->force_off && !e->force_on)
> return false;
>
> if (!group_has_usable_regions(e, p))

Reinette