Added support for allocate RandomX dataset on each NUMA node.
This commit is contained in:
parent
e53ae0c15e
commit
828fc065b0
11 changed files with 178 additions and 70 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue