]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fs/resctrl: Move RMID initialization to first mount
authorTony Luck <tony.luck@intel.com>
Wed, 17 Dec 2025 17:21:15 +0000 (09:21 -0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Sat, 10 Jan 2026 10:46:48 +0000 (11:46 +0100)
commitd0891647fbc6e931f27517364cbc4ee1811d76db
tree4922c8f03d8b740ff63c4ac5d412995add064ec0
parent0ecc988b0232259cbdb2b7e452bda74f550f0911
fs/resctrl: Move RMID initialization to first mount

L3 monitor features are enumerated during resctrl initialization and
rmid_ptrs[] that tracks all RMIDs and depends on the number of supported
RMIDs is allocated during this time.

Telemetry monitor features are enumerated during first resctrl mount and
may support a different number of RMIDs compared to L3 monitor features.

Delay allocation and initialization of rmid_ptrs[] until first mount.
Since the number of RMIDs cannot change on later mounts, keep the same set of
rmid_ptrs[] until resctrl_exit(). This is required because the limbo handler
keeps running after resctrl is unmounted and needs to access rmid_ptrs[]
as it keeps tracking busy RMIDs after unmount.

Rename routines to match what they now do:
dom_data_init() -> setup_rmid_lru_list()
dom_data_exit() -> free_rmid_lru_list()

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/20251217172121.12030-1-tony.luck@intel.com
fs/resctrl/internal.h
fs/resctrl/monitor.c
fs/resctrl/rdtgroup.c