Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NUMA node exception check for CXL device #337

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions BM/topology/cpu_topology.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ LL3_VALUE=""
DIE_VALUE=""
SNC_VALUE=""
LL3_PER_SOCKET=""
CXL_DEVICE=""
CXL_MEM=""

: "${CASE_NAME:=""}"

Expand All @@ -25,6 +27,12 @@ usage() {
__EOF
}

CXL_DEVICE=$(lspci | grep CXL 2>&1)
[[ -n "$CXL_DEVICE" ]] && test_print_trc "CXL device is available."

CXL_MEM=$(grep CXL /proc/iomem 2>&1)
[[ -n "$CXL_MEM" ]] && test_print_trc "CXL memory is available."

# cpuid tool is required to run cases
if which cpuid 1>/dev/null 2>&1; then
cpuid 1>/dev/null || block_test "Failed to run cpuid tool,
Expand Down Expand Up @@ -225,6 +233,8 @@ socket_num() {
[[ $numa_num -eq $snc_enabled_pkg_num_two ]] || [[ $numa_num -eq $snc_enabled_pkg_num_three ]]
then
test_print_trc "SNC is enabled, sockets and NUMA Nodes number is expected."
elif [[ -n "$CXL_DEVICE" ]] && [[ -n "$CXL_MEM" ]]; then
test_print_trc "CXL device is available, sockets and NUMA Nodes number is expected."
else
die "socket number is not aligned between lspci and sysfs"
fi
Expand Down
Loading