/sys/devices/system/cpu contains incorrect information for Intel big.LITTLE CPUs
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
Version
Microsoft Windows [Version 10.0.22621.674]
WSL Version
- WSL 2
- WSL 1
Kernel Version
5.10.16.3-microsoft-standard-WSL2
Distro Version
Ubuntu 22.04.1 LTS
Other Software
None
Repro Steps
The command below loops over all CPU cores and prints the sizes of the CPU's L1 data cache (per core).
for i in {0..64}; do cat /sys/devices/system/cpu/cpu$i/cache/index0/size 2>/dev/null; done | sort | uniq
Expected Behavior
For recent Intel big.LITTLE CPUs (>= 12th Gen, Alder Lake) this should print 32 KiB for the L1 data cache size of the efficiency CPU cores and 48 KiB for the L1 data cache size of the performance CPU cores.
for i in {0..64}; do cat /sys/devices/system/cpu/cpu$i/cache/index0/size 2>/dev/null; done | sort | uniq
32 KiB
48 KiB
Actual Behavior
The command below only prints 48 KiB for the L1 data cache size of the performance CPU cores.
for i in {0..64}; do cat /sys/devices/system/cpu/cpu$i/cache/index0/size 2>/dev/null; done | sort | uniq
48 KiB
Hence /sys/devices/system/cpu currently only contains information about the performance CPU cores and all information about the efficiency CPU cores is missing. Why does this matter? Because most CPU information libraries like e.g. pytorch/cpuinfo & open-mpi/hwloc rely on this CPU info and other programs depending on these libraries use this CPU information for runtime tuning to achieve the best performance for the user's CPU.
Diagnostic Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce this in WSL 2 on an Alder Lake or newer Intel CPU by running the reported loop against /sys/devices/system/cpu/cpu$i/cache/index0/size. Compare the output with the expected 32 KiB and 48 KiB values for efficiency and performance cores; the issue is done when both cache sizes and the related efficiency-core information are exposed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100