From: Fenghua Yu <fenghua.yu@intel.com>
To: "Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>, "H Peter Anvin" <hpa@zytor.com>,
"Tony Luck" <tony.luck@intel.com>,
"Reinette Chatre" <reinette.chatre@intel.com>,
"Babu Moger" <babu.moger@amd.com>,
"James Morse" <james.morse@arm.com>,
"Ravi V Shankar" <ravi.v.shankar@intel.com>,
"Sai Praneeth Prakhya" <sai.praneeth.prakhya@intel.com>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>,
"x86" <x86@kernel.org>, Fenghua Yu <fenghua.yu@intel.com>
Subject: [PATCH v9 11/13] selftests/resctrl: Use cache index3 id for AMD schemata masks
Date: Mon, 16 Dec 2019 14:26:45 -0800 [thread overview]
Message-ID: <1576535207-2417-12-git-send-email-fenghua.yu@intel.com> (raw)
In-Reply-To: <1576535207-2417-1-git-send-email-fenghua.yu@intel.com>
From: Babu Moger <babu.moger@amd.com>
AMD uses the cache l3 boundary for schemata masks. Update it accordigly.
Signed-off-by: Babu Moger <babu.moger@amd.com>
Co-developed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
tools/testing/selftests/resctrl/resctrlfs.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c
index 8772c8c4d5d0..19c0ec4045a4 100644
--- a/tools/testing/selftests/resctrl/resctrlfs.c
+++ b/tools/testing/selftests/resctrl/resctrlfs.c
@@ -113,8 +113,13 @@ int get_resource_id(int cpu_no, int *resource_id)
char phys_pkg_path[1024];
FILE *fp;
- sprintf(phys_pkg_path, "%s%d/topology/physical_package_id",
- PHYS_ID_PATH, cpu_no);
+ if (is_amd)
+ sprintf(phys_pkg_path, "%s%d/cache/index3/id",
+ PHYS_ID_PATH, cpu_no);
+ else
+ sprintf(phys_pkg_path, "%s%d/topology/physical_package_id",
+ PHYS_ID_PATH, cpu_no);
+
fp = fopen(phys_pkg_path, "r");
if (!fp) {
perror("Failed to open physical_package_id");
--
2.19.1
next prev parent reply other threads:[~2019-12-16 22:15 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 22:26 [PATCH v9 00/13] selftests/resctrl: Add resctrl selftest Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 01/13] selftests/resctrl: Add README for resctrl tests Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 02/13] selftests/resctrl: Add basic resctrl file system operations and data Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 03/13] selftests/resctrl: Read memory bandwidth from perf IMC counter and from resctrl file system Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 04/13] selftests/resctrl: Add callback to start a benchmark Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 05/13] selftests/resctrl: Add built in benchmark Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 06/13] selftests/resctrl: Add MBM test Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 07/13] selftests/resctrl: Add MBA test Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 08/13] selftests/resctrl: Add Cache QoS Monitoring (CQM) selftest Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 09/13] selftests/resctrl: Add Cache Allocation Technology (CAT) selftest Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 10/13] selftests/resctrl: Add vendor detection mechanism Fenghua Yu
2019-12-16 22:26 ` Fenghua Yu [this message]
2019-12-16 22:26 ` [PATCH v9 12/13] selftests/resctrl: Disable MBA and MBM tests for AMD Fenghua Yu
2019-12-16 22:26 ` [PATCH v9 13/13] selftests/resctrl: Add the test in MAINTAINERS Fenghua Yu
2019-12-17 18:23 ` [PATCH v9 00/13] selftests/resctrl: Add resctrl selftest Babu Moger
2020-01-09 16:06 ` Moger, Babu
2020-01-15 21:17 ` Fenghua Yu
2020-01-15 21:55 ` Thomas Gleixner
2020-01-16 19:42 ` Fenghua Yu
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=1576535207-2417-12-git-send-email-fenghua.yu@intel.com \
--to=fenghua.yu@intel.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=ravi.v.shankar@intel.com \
--cc=reinette.chatre@intel.com \
--cc=sai.praneeth.prakhya@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).