x86/resctrl: Add write option to "mba_MBps_event" file
authorTony Luck <tony.luck@intel.com>
Fri, 6 Dec 2024 16:31:47 +0000 (08:31 -0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 12 Dec 2024 10:27:37 +0000 (11:27 +0100)
commit8e931105acae688ff0fc8f875a6c05e5aed8ab79
tree3ed0e53b602ea0ec9280fb8e484630a8d61e8883
parentf5cd0e316f14d79c9eb0cf8fe7e60cee3a657aa8
x86/resctrl: Add write option to "mba_MBps_event" file

The "mba_MBps" mount option provides an alternate method to control memory
bandwidth. Instead of specifying allowable bandwidth as a percentage of
maximum possible, the user provides a MiB/s limit value.

There is a file in each CTRL_MON group directory that shows the event
currently in use.

Allow writing that file to choose a different event.

A user can choose any of the memory bandwidth monitoring events listed in
/sys/fs/resctrl/info/L3_mon/mon_features independently for each CTRL_MON group
by writing to each of the "mba_MBps_event" files.

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>
Tested-by: Babu Moger <babu.moger@amd.com>
Link: https://lore.kernel.org/r/20241206163148.83828-8-tony.luck@intel.com
arch/x86/kernel/cpu/resctrl/ctrlmondata.c
arch/x86/kernel/cpu/resctrl/internal.h
arch/x86/kernel/cpu/resctrl/rdtgroup.c