]> Gentwo Git Trees - linux/.git/commit
x86,fs/resctrl: Consolidate monitor event descriptions
authorTony Luck <tony.luck@intel.com>
Fri, 5 Sep 2025 21:34:00 +0000 (16:34 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 15 Sep 2025 09:46:08 +0000 (11:46 +0200)
commit09f37134464cc03baf5cb8eab2d99db27ee73217
tree7bfccbfafc0c166d89c262dd0823ed28ed2258f1
parent0e58f6a7dd689c73d67e6a2164b46d4618f2698a
x86,fs/resctrl: Consolidate monitor event descriptions

There are currently only three monitor events, all associated with the
RDT_RESOURCE_L3 resource. Growing support for additional events will be easier
with some restructuring to have a single point in file system code where all
attributes of all events are defined.

Place all event descriptions into an array mon_event_all[]. Doing this has the
beneficial side effect of removing the need for rdt_resource::evt_list.

Add resctrl_event_id::QOS_FIRST_EVENT for a lower bound on range checks for
event ids and as the starting index to scan mon_event_all[].

Drop the code that builds evt_list and change the two places where the list is
scanned to scan mon_event_all[] instead using a new helper macro
for_each_mon_event().

Architecture code now informs file system code which events are available with
resctrl_enable_mon_event().

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/cover.1757108044.git.babu.moger@amd.com
arch/x86/kernel/cpu/resctrl/core.c
fs/resctrl/internal.h
fs/resctrl/monitor.c
fs/resctrl/rdtgroup.c
include/linux/resctrl.h
include/linux/resctrl_types.h