Skip to content
Closed
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
13 changes: 8 additions & 5 deletions test/e2e/performanceprofile/functests/13_llc/llc.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,11 +786,14 @@ var _ = Describe("[rfe_id:77446] LLC-aware cpu pinning", Label(string(label.Open
ccx, err := getCCX(0)
Expect(err).ToNot(HaveOccurred())
L3CacheGroupSize = ccx.Size()
// Get actual CPU ID's from Numa Node 0
numaNode0Cpus := cpuset.New(numaInfo[0]...)

// Compare if L3 cache group CPUs match NUMA Node 0 CPUs
if ccx.Equals(numaNode0Cpus) {
// Compare length of numa node 0 cpus with ccx size
// if they are same then L3 Cache spans the whole of numa node
// we cannot compare the L3 cache cpus are same as numa node 0 cpus as
// as the cpu topology as they many not be same . For example
// ccx cpus may be 0-11, and numa node0 cpus could be 0,2,4,6,8,10,12,14,16,18,22
// if we were to compare the equality, the equality fails and tests will not be
// skipped atleast on Virtual machines
if len(numaInfo[0]) == L3CacheGroupSize {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comparing the size is too coarse grained and makes for unnecessary skips. What creates this difference between CCX cpus and NUMA node cpus?

Copy link
Contributor Author

@mrniranjan mrniranjan Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't know why . On libvirt when we create vm's we specify the cpu id's of numa nodes in the vm definition , the cache hierarchy that libvirt tries to emulate probably doesn't take in to account the cpu id's. Either way if the total cpus sharing the cache and number of cpus in that node match, shouldn't that be enough to say that there is no specific subset of cpus sharing L3 cache ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work by coincidence; or, alternatively, I can't see a reliable way to skip which takes in account this odd case. Rather than guess, let's label VM nodes and skip based on labels. At least it's very explicit and consistent and easy to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ffromani I am closing this PR, I have modified the cpu topology on VM's to use the same toplogy as it lists in shared_cpu_list

NUMA node(s):              2
NUMA node0 CPU(s):         0-11
NUMA node1 CPU(s):         12-23

sh-5.1# cat /sys/devices/system/cpu/cpu0/cache/index3/shared_cpu_list
0-11
sh-5.1# cat /sys/devices/system/cpu/cpu1/cache/index3/shared_cpu_list
0-11
sh-5.1# cat /sys/devices/system/cpu/cpu12/cache/index3/shared_cpu_list
12-23
sh-5.1# cat /sys/devices/system/cpu/cpu13/cache/index3/shared_cpu_list
12-23

so the current code should work.

Skip("This test requires systems where L3 cache is shared amount subset of cpus")
}

Expand Down