Fixed, benchmark validation on NUMA hardware produced incorrect results in some conditions.

This commit is contained in:
XMRig 2020-11-25 09:35:11 +07:00
parent 09b68f3cdb
commit 8686e08336
No known key found for this signature in database
GPG key ID: 446A53638BE94409
12 changed files with 78 additions and 51 deletions

View file

@ -347,13 +347,7 @@ void xmrig::CpuBackend::setJob(const Job &job)
const auto &cpu = d_ptr->controller->config()->cpu();
# ifdef XMRIG_FEATURE_BENCHMARK
const uint32_t benchSize = BenchState::size();
# else
constexpr uint32_t benchSize = 0;
# endif
auto threads = cpu.get(d_ptr->controller->miner(), job.algorithm(), benchSize);
auto threads = cpu.get(d_ptr->controller->miner(), job.algorithm());
if (!d_ptr->threads.empty() && d_ptr->threads.size() == threads.size() && std::equal(d_ptr->threads.begin(), d_ptr->threads.end(), threads.begin())) {
return;
}
@ -370,7 +364,7 @@ void xmrig::CpuBackend::setJob(const Job &job)
stop();
# ifdef XMRIG_FEATURE_BENCHMARK
if (benchSize) {
if (BenchState::size()) {
d_ptr->benchmark = std::make_shared<Benchmark>(threads.size(), this);
}
# endif