Re: [PATCH v7 06/14] fs/resctrl: Add interface to disable a monitor event

From: Reinette Chatre

Date: Thu Jun 11 2026 - 17:22:35 EST


Hi Tony,

On 6/10/26 4:19 PM, Luck, Tony wrote:
> I took your suggested commit comment. Did some edits of my own and then asked AI to offer improvements.
>
> It came up with this
>
> ---
>
> resctrl currently assumes all monitor events are enabled before any domain
> is created, because per-domain state is allocated by the architecture's CPU
> hotplug callbacks. There is no way to disable an event once registered.
>
> AET events are enumerated by the INTEL_PMT_TELEMETRY driver. To allow that
> driver to be a loadable module, resctrl must tolerate AET events appearing
> and disappearing, which requires the ability to disable an event when the
> driver is unloaded.
>
> Add resctrl_disable_mon_event(). The architecture owns domain lifetime and mount
> state, so it is responsible for calling this only while resctrl is unmounted

nit: "owns domain lifetime and mount state" -> "owns domain lifetime and knows mount
state"
(architecture does not own mount state)

> and for cleaning up any per-domain state. Document those requirements in
> the kerneldoc since they are not enforced in code.
>
Looks good to me. Thank you.

Reinette