x86/resctrl: Compute memory bandwidth for all supported events
authorTony Luck <tony.luck@intel.com>
Fri, 6 Dec 2024 16:31:44 +0000 (08:31 -0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 10 Dec 2024 15:13:48 +0000 (16:13 +0100)
commit2c272fadb58b590eb973c6c447b039f10631f5f7
tree859eb88122c397b6a6e84f7fc658d2a458204f1e
parent481d363748b2df881df21569f3697b3c7fcf8fc1
x86/resctrl: Compute memory bandwidth for all supported events

Switching between local and total memory bandwidth events as the input
to the mba_sc feedback loop would be cumbersome and take effect slowly
in the current implementation as the bandwidth is only known after two
consecutive readings of the same event.

Compute the bandwidth for all supported events. This doesn't add
significant overhead and will make changing which event is used
simple.

Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
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-5-tony.luck@intel.com
arch/x86/kernel/cpu/resctrl/monitor.c