summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/resctrl/cmt_test.c
diff options
context:
space:
mode:
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>2024-12-16 16:18:54 +0100
committerShuah Khan <skhan@linuxfoundation.org>2025-01-14 17:06:32 -0700
commitd6d35d0b0f4267612eb905305f3f2f7aa048bfd4 (patch)
treecb12574cae4b8fb4e3da9f8d0d7f781d5d57d6d5 /tools/testing/selftests/resctrl/cmt_test.c
parenta1cd99e700ec006c36c4f01be984e2a19eb3e2f1 (diff)
selftests/resctrl: Discover SNC kernel support and adjust messages
Resctrl selftest prints a message on test failure that Sub-Numa Clustering (SNC) could be enabled and points the user to check their BIOS settings. No actual check is performed before printing that message so it is not very accurate in pinpointing a problem. When there is SNC support for kernel's resctrl subsystem and SNC is enabled then sub node files are created for each node in the resctrlfs. The sub node files exist in each regular node's L3 monitoring directory. The reliable path to check for existence of sub node files is /sys/fs/resctrl/mon_data/mon_L3_00/mon_sub_L3_00. Add helper that checks for mon_sub_L3_00 existence. Correct old messages to account for kernel support of SNC in resctrl. 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 'tools/testing/selftests/resctrl/cmt_test.c')
-rw-r--r--tools/testing/selftests/resctrl/cmt_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c
index 3bbf3042fb06..d09e693dc739 100644
--- a/tools/testing/selftests/resctrl/cmt_test.c
+++ b/tools/testing/selftests/resctrl/cmt_test.c
@@ -169,8 +169,8 @@ static int cmt_run_test(const struct resctrl_test *test, const struct user_param
return ret;
ret = check_results(&param, span, n);
- if (ret && (get_vendor() == ARCH_INTEL))
- ksft_print_msg("Intel CMT may be inaccurate when Sub-NUMA Clustering is enabled. Check BIOS configuration.\n");
+ if (ret && (get_vendor() == ARCH_INTEL) && !snc_kernel_support())
+ ksft_print_msg("Kernel doesn't support Sub-NUMA Clustering but it is enabled on the system.\n");
return ret;
}