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) inline void initDatasets(uint32_t threads, int priority)
{ {
uint64_t ts = Chrono::steadyMSecs(); uint64_t ts = Chrono::steadyMSecs();
auto id = m_nodeset.front(); uint32_t id = 0;
auto primary = dataset(id);
for (const auto &kv : m_datasets) {
if (kv.second->cache()) {
id = kv.first;
}
}
auto primary = dataset(id);
primary->init(m_seed.data(), threads, priority); primary->init(m_seed.data(), threads, priority);
printDatasetReady(id, ts); printDatasetReady(id, ts);