Added support for allocate RandomX dataset on each NUMA node.

This commit is contained in:
XMRig 2019-07-27 19:41:59 +07:00
parent e53ae0c15e
commit 828fc065b0
11 changed files with 178 additions and 70 deletions

View file

@ -24,6 +24,7 @@
*/
#include <assert.h>
#include <thread>
@ -81,15 +82,20 @@ xmrig::CpuWorker<N>::~CpuWorker()
template<size_t N>
void xmrig::CpuWorker<N>::allocateRandomX_VM()
{
while (!Rx::isReady(m_job.currentJob(), m_affinity)) {
while (!Rx::isReady(m_job.currentJob(), m_node)) {
std::this_thread::sleep_for(std::chrono::milliseconds(200));
if (Nonce::sequence(Nonce::CPU) == 0) {
break;
return;
}
}
RxDataset *dataset = Rx::dataset(m_affinity);
RxDataset *dataset = Rx::dataset(m_node);
assert(dataset != nullptr);
if (!dataset) {
return;
}
if (!m_vm) {
m_vm = new RxVm(dataset, m_memory->scratchpad(), !m_hwAES);