x86/resctrl: Make mba_sc use total bandwidth if local is not supported
authorTony Luck <tony.luck@intel.com>
Fri, 6 Dec 2024 16:31:45 +0000 (08:31 -0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 10 Dec 2024 15:15:14 +0000 (16:15 +0100)
commit141cb5c482b38d7e494a207f881d0fe61e4848ef
treede02ac416b75c36ba241c4d454a0769e0cd9f888
parent2c272fadb58b590eb973c6c447b039f10631f5f7
x86/resctrl: Make mba_sc use total bandwidth if local is not supported

The default input measurement to the mba_sc feedback loop for memory bandwidth
control when the user mounts with the "mba_MBps" option is the local bandwidth
event. But some systems may not support a local bandwidth event.

When local bandwidth event is not supported, check for support of total
bandwidth and use that instead.

Relax the mount option check to allow use of the "mba_MBps" option for systems
when only total bandwidth monitoring is supported. Also update the error
message.

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-6-tony.luck@intel.com
arch/x86/kernel/cpu/resctrl/core.c
arch/x86/kernel/cpu/resctrl/rdtgroup.c