Show L3CA/MBA COS definitions per L3 cluster on AMD and Hygon#305
Show L3CA/MBA COS definitions per L3 cluster on AMD and Hygon#305shenxiaochen wants to merge 3 commits intointel:masterfrom
Conversation
|
Note: The code base of this PR is on top of #300 and #299 [This PR - #305 ] [PR #300 ] [PR #299 ] Best regards, |
|
I would appreciate it if you could review this PR at your convenience. As a heads-up, it depends on PR #300. |
There was a problem hiding this comment.
Pull request overview
This PR adds support for displaying L3CA/MBA COS definitions per L3 cluster instead of per socket on AMD and Hygon platforms, where Platform QoS allocation configuration is per L3 cluster (Core Complex - CCX).
Changes:
- Adds support for Hygon vendor alongside AMD throughout the codebase
- Introduces
pqos_cpu_get_l3_clusters()function to retrieve L3 cluster IDs - Implements
print_per_l3_cluster_config()to display per-cluster configuration
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/pqos.h | Adds PQOS_VENDOR_HYGON enum value and pqos_cpu_get_l3_clusters function declaration |
| lib/utils.c | Implements pqos_cpu_get_l3_clusters to retrieve L3 cluster IDs from CPU info |
| lib/cpuinfo.c | Adds Hygon vendor detection and initialization logic |
| lib/hw_cap.c | Adds Hygon-specific counter length handling for monitoring capabilities |
| lib/cap.c | Routes Hygon to AMD-specific MBA discovery path |
| lib/api.c | Routes Hygon to AMD-specific MBA get/set functions |
| pqos/alloc.c | Implements print_per_l3_cluster_config and updates alloc_print_config to use it for AMD/Hygon |
| rdtset/rdt.c | Updates vendor checks to include Hygon for MBA and display logic |
| lib/python/pqos/native_struct.py | Adds PQOS_VENDOR_HYGON constant |
| lib/python/pqos/cpuinfo.py | Adds Hygon vendor string mapping |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @shenxiaochen |
@rkanagar Thank you very much for code review! I will address the Copilot review comments inline. |
7434f28 to
c12238b
Compare
|
Hi @shenxiaochen , Please rebase this PR. We are ready to merge. Thanks, |
c12238b to
d4b88fa
Compare
Rebased on top of master tree (after PR #300 merged). Thank you! |
d4b88fa to
c0c5c63
Compare
|
Git pushed code to fix the comments mentioned in #305 (review) and #305 (review) |
The function pqos_cpu_get_l3_clusters retrieves the L3 cluster id's from cpu info structure. This function will be used in pqos function alloc_print_config. Signed-off-by: Xiaochen Shen <shenxiaochen@open-hieco.net>
The function print_per_l3_cluster_config prints per L3 cluster L3 CAT, MBA and SMBA class definition. This function will be used in function alloc_print_config. Signed-off-by: Xiaochen Shen <shenxiaochen@open-hieco.net>
AMD and Hygon Platform QoS allocation configuration is per L3 cluster
(or Core Complex - CCX). Each L3 cluster (CCX) has one L3 cluster ID
which is used for both CAT and MBA ids.
Show L3CA/MBA COS definitions per L3 cluster instead of per socket on
AMD and Hygon platforms. The output of "pqos -s" looks like:
$ pqos -s
L3CA/MBA COS definitions for L3 Cluster (or Core Complex) 0:
L3CA COS0 => MASK 0xffff
...
L3CA COS15 => MASK 0xffff
MBA COS0 => 2048 available
...
MBA COS15 => 2048 available
L3CA/MBA COS definitions for L3 Cluster (or Core Complex) N:
...
Signed-off-by: Xiaochen Shen <shenxiaochen@open-hieco.net>
c0c5c63 to
d4e34d4
Compare
|
Merged |
@rkanagar Thank you very much for help! |
Show L3CA/MBA COS definitions per L3 cluster on AMD and Hygon
Description
This PR adds 3 patches (2 preparatory patches) to support showing L3CA/MBA COS definitions per L3 cluster instead of per socket on AMD and Hygon platforms that Platform QoS allocation configuration is per L3 cluster (or Core Complex - CCX).
The output of "pqos -s" looks like:
Xiaochen Shen (3):
lib: Introduce pqos_cpu_get_l3_clusters
pqos: Introduce print_per_l3_cluster_config
pqos: Show L3CA/MBA COS definitions per L3 cluster on AMD and Hygon
Affected parts
Motivation and Context
AMD and Hygon Platform QoS allocation configuration is per L3 cluster (or Core Complex - CCX). Each L3 cluster (CCX) has one L3 cluster ID which is used for both CAT and MBA ids.
Show L3CA/MBA COS definitions per L3 cluster instead of per socket on AMD and Hygon platforms. The output of "pqos -s" looks like:
How Has This Been Tested?
(1) The output of "pqos -s" shows "L3CA/MBA COS definitions for L3 Cluster (or Core Complex) N" on AMD or Hygon platforms.
(2) Passed all tests in intel-cmt-cat/unit-test.
Types of changes
Checklist: