diff --git a/src/backend/cpu/platform/HwlocCpuInfo.cpp b/src/backend/cpu/platform/HwlocCpuInfo.cpp index 047c97e8..491305ec 100644 --- a/src/backend/cpu/platform/HwlocCpuInfo.cpp +++ b/src/backend/cpu/platform/HwlocCpuInfo.cpp @@ -289,6 +289,12 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith } # endif +# ifdef XMRIG_ALGO_RANDOMX + if (extra == 0 && algorithm.l2() > 0) { + cacheHashes = std::min(std::max(L2 / algorithm.l2(), cores.size()), cacheHashes); + } +# endif + if (cacheHashes >= PUs) { for (hwloc_obj_t core : cores) { const std::vector units = findByType(core, HWLOC_OBJ_PU);