Fixed RandomX cache initialization if 1GB pages fails to allocate on a first NUMA node.

This commit is contained in:
XMRig 2020-08-01 12:30:02 +07:00
parent 0addf91a70
commit ae3ff0f570
No known key found for this signature in database
GPG Key ID: 446A53638BE94409

View File

@ -176,10 +176,16 @@ public:
inline void initDatasets(uint32_t threads, int priority)
{
uint64_t ts = Chrono::steadyMSecs();
auto id = m_nodeset.front();
auto primary = dataset(id);
uint64_t ts = Chrono::steadyMSecs();
uint32_t id = 0;
for (const auto &kv : m_datasets) {
if (kv.second->cache()) {
id = kv.first;
}
}
auto primary = dataset(id);
primary->init(m_seed.data(), threads, priority);
printDatasetReady(id, ts);