diff options
author | Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> | 2024-12-16 16:18:53 +0100 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2025-01-14 17:06:32 -0700 |
commit | a1cd99e700ec006c36c4f01be984e2a19eb3e2f1 (patch) | |
tree | 266789b47a7a22e19eda893b506191ec98edddb5 /net/lapb/lapb_in.c | |
parent | 89ae64384e5886e8e7c9cc0fcc31e50f4987fae8 (diff) |
selftests/resctrl: Adjust effective L3 cache size with SNC enabled
Sub-NUMA Cluster divides CPUs sharing an L3 cache into separate NUMA
nodes. Systems may support splitting into either two, three, four or six
nodes. When SNC mode is enabled the effective amount of L3 cache
available for allocation is divided by the number of nodes per L3.
It's possible to detect which SNC mode is active by comparing the number
of CPUs that share a cache with CPU0, with the number of CPUs on node0.
Detect SNC mode once and let other tests inherit that information.
Update CFLAGS after including lib.mk in the Makefile so that fallthrough
macro can be used.
To check if SNC detection is reliable one can check the
/sys/devices/system/cpu/offline file. If it's empty, it means all cores
are operational and the ratio should be calculated correctly. If it has
any contents, it means the detected SNC mode can't be trusted and should
be disabled.
Check if detection was not reliable due to offline cpus. If it was skip
running tests since the results couldn't be trusted.
Co-developed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions