RE: [PATCH v7 06/14] fs/resctrl: Add interface to disable a monitor event
From: Luck, Tony
Date: Wed Jun 10 2026 - 19:19:38 EST
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
and for cleaning up any per-domain state. Document those requirements in
the kerneldoc since they are not enforced in code.
---
-Tony