Fixed dataset initialization speed on Linux if thread affinity was used.
This commit is contained in:
parent
ccd5fae5e1
commit
d4772cbd5d
9 changed files with 95 additions and 51 deletions
|
@ -81,7 +81,15 @@ xmrig::CpuWorker<N>::~CpuWorker()
|
|||
template<size_t N>
|
||||
void xmrig::CpuWorker<N>::allocateRandomX_VM()
|
||||
{
|
||||
RxDataset *dataset = Rx::dataset(m_job.currentJob().seedHash(), m_job.currentJob().algorithm());
|
||||
while (!Rx::isReady(m_job.currentJob(), m_affinity)) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||
|
||||
if (Nonce::sequence(Nonce::CPU) == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RxDataset *dataset = Rx::dataset(m_affinity);
|
||||
|
||||
if (!m_vm) {
|
||||
m_vm = new RxVm(dataset, m_memory->scratchpad(), !m_hwAES);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue