From: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
To: Fenghua Yu <fenghua.yu@intel.com>,
Reinette Chatre <reinette.chatre@intel.com>,
Shuah Khan <shuah@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
tan.shaopeng@jp.fujitsu.com
Subject: [PATCH v5 2/2] selftests/resctrl: Print a message if the result of MBM&CMT tests is failed on Intel CPU
Date: Wed, 23 Mar 2022 17:09:28 +0900 [thread overview]
Message-ID: <20220323080928.1586408-3-tan.shaopeng@jp.fujitsu.com> (raw)
In-Reply-To: <20220323080928.1586408-1-tan.shaopeng@jp.fujitsu.com>
According to "Intel Resource Director Technology (Intel RDT) on
2nd Generation Intel Xeon Scalable Processors Reference Manual",
When the Intel Sub-NUMA Clustering(SNC) feature is enabled,
Intel CMT and MBM counters may not be accurate.
However, there does not seem to be an architectural way to detect
if SNC is enabled.
If the result of MBM&CMT test fails on Intel CPU,
print a message to let users know a possible cause of failure.
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
---
tools/testing/selftests/resctrl/resctrl_tests.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
index 3e7cdf1125df..f8da3ecf67ef 100644
--- a/tools/testing/selftests/resctrl/resctrl_tests.c
+++ b/tools/testing/selftests/resctrl/resctrl_tests.c
@@ -86,6 +86,8 @@ static void run_mbm_test(bool has_ben, char **benchmark_cmd, int span,
sprintf(benchmark_cmd[5], "%s", MBA_STR);
res = mbm_bw_change(span, cpu_no, bw_report, benchmark_cmd);
ksft_test_result(!res, "MBM: bw change\n");
+ if ((get_vendor() == ARCH_INTEL) && res)
+ ksft_print_msg("Intel MBM may be inaccurate when Sub-NUMA Clustering is enabled. Check BIOS configuration.\n");
mbm_test_cleanup();
}
@@ -122,6 +124,8 @@ static void run_cmt_test(bool has_ben, char **benchmark_cmd, int cpu_no)
sprintf(benchmark_cmd[5], "%s", CMT_STR);
res = cmt_resctrl_val(cpu_no, 5, benchmark_cmd);
ksft_test_result(!res, "CMT: test\n");
+ if ((get_vendor() == ARCH_INTEL) && res)
+ ksft_print_msg("Intel CMT may be inaccurate when Sub-NUMA Clustering is enabled. Check BIOS configuration.\n");
cmt_test_cleanup();
}
--
2.27.0
next prev parent reply other threads:[~2022-03-23 8:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-23 8:09 [PATCH v5 0/2] " Shaopeng Tan
2022-03-23 8:09 ` [PATCH v5 1/2] selftests/resctrl: Extend CPU vendor detection Shaopeng Tan
2022-03-28 18:38 ` Reinette Chatre
2022-03-29 15:34 ` Shuah Khan
2022-03-23 8:09 ` Shaopeng Tan [this message]
2022-03-29 15:34 ` [PATCH v5 2/2] selftests/resctrl: Print a message if the result of MBM&CMT tests is failed on Intel CPU Shuah Khan
2022-03-29 15:37 ` [PATCH v5 0/2] " Shuah Khan
2022-04-25 21:19 ` Reinette Chatre
2022-04-25 23:00 ` Shuah Khan
2022-04-25 23:20 ` Reinette Chatre
2022-04-26 10:09 ` tan.shaopeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220323080928.1586408-3-tan.shaopeng@jp.fujitsu.com \
--to=tan.shaopeng@jp.fujitsu.com \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®