microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.25k stars 812 forks source link

/sys/devices/system/cpu contains incorrect information for Intel big.LITTLE CPUs #9121

Open kimwalisch opened 1 year ago

kimwalisch commented 1 year ago

Version

Microsoft Windows [Version 10.0.22621.674]

WSL Version

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

borjamunozf commented 2 weeks ago

any news about this? Not sure if this issue could impact our ongoing performance problem in #11966