]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/resctrl: Discover SNC kernel support and adjust messages
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Mon, 16 Dec 2024 15:18:54 +0000 (16:18 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 15 Jan 2025 00:06:32 +0000 (17:06 -0700)
commitd6d35d0b0f4267612eb905305f3f2f7aa048bfd4
treecb12574cae4b8fb4e3da9f8d0d7f781d5d57d6d5
parenta1cd99e700ec006c36c4f01be984e2a19eb3e2f1
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>
tools/testing/selftests/resctrl/cmt_test.c
tools/testing/selftests/resctrl/mba_test.c
tools/testing/selftests/resctrl/mbm_test.c
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrlfs.c