Merge pull request #3671 from SChernykh/dev
Hwloc: fixed detection of L2 cache size for some complex NUMA topologies
This commit is contained in:
commit
48faf0a11b
1 changed files with 14 additions and 3 deletions
|
@ -311,10 +311,9 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
|
|||
uint32_t intensity = algorithm.maxIntensity() == 1 ? 0 : 1;
|
||||
|
||||
if (cache->attr->cache.depth == 3) {
|
||||
for (size_t i = 0; i < cache->arity; ++i) {
|
||||
hwloc_obj_t l2 = cache->children[i];
|
||||
auto process_L2 = [&L2, &L2_associativity, L3_exclusive, this, &extra, scratchpad](hwloc_obj_t l2) {
|
||||
if (!hwloc_obj_type_is_cache(l2->type) || l2->attr == nullptr) {
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
|
||||
L2 += l2->attr->cache.size;
|
||||
|
@ -329,6 +328,18 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
|
|||
extra += scratchpad;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < cache->arity; ++i) {
|
||||
hwloc_obj_t ch = cache->children[i];
|
||||
if (ch->type == HWLOC_OBJ_GROUP) {
|
||||
for (size_t j = 0; j < ch->arity; ++j) {
|
||||
process_L2(ch->children[j]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
process_L2(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue