From 445fe917b2859e031ad40e30e38cdd135537eae8 Mon Sep 17 00:00:00 2001 From: Kim Walisch Date: Sat, 16 Nov 2024 10:12:19 +0100 Subject: [PATCH] Add comment --- src/CpuInfo.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/CpuInfo.cpp b/src/CpuInfo.cpp index a81f85f3..743ff964 100644 --- a/src/CpuInfo.cpp +++ b/src/CpuInfo.cpp @@ -639,6 +639,13 @@ void CpuInfo::init() std::vector cpuIds; cpuIds.reserve(3); + // Based on my tests, for hybrid CPUs the Linux kernel always lists + // all performance CPU cores first and all efficiency CPU cores + // last, regardless of the actual physical CPU core layout on the + // die. I tested this using an Intel Arrow Lake 245K CPU where the + // physical CPU core layout (2 P-cores, 8 E-cores, 4 P-cores) on the + // die is different from what the Linux kernel reports. + // Check 1st, last & middle CPU core cpuIds.push_back(0); if (logicalCpuCores_ >= 2)