Return correct hugePages count if NUMA mode used.
This commit is contained in:
parent
828fc065b0
commit
9df9275120
4 changed files with 27 additions and 9 deletions
|
@ -146,7 +146,6 @@ static RxPrivate *d_ptr = new RxPrivate();
|
|||
} // namespace xmrig
|
||||
|
||||
|
||||
|
||||
bool xmrig::Rx::isReady(const Job &job, uint32_t nodeId)
|
||||
{
|
||||
d_ptr->lock();
|
||||
|
@ -157,7 +156,6 @@ bool xmrig::Rx::isReady(const Job &job, uint32_t nodeId)
|
|||
}
|
||||
|
||||
|
||||
|
||||
xmrig::RxDataset *xmrig::Rx::dataset(uint32_t nodeId)
|
||||
{
|
||||
d_ptr->lock();
|
||||
|
@ -168,6 +166,27 @@ xmrig::RxDataset *xmrig::Rx::dataset(uint32_t nodeId)
|
|||
}
|
||||
|
||||
|
||||
std::pair<size_t, size_t> xmrig::Rx::hugePages()
|
||||
{
|
||||
std::pair<size_t, size_t> pages(0, 0);
|
||||
d_ptr->lock();
|
||||
|
||||
for (auto const &item : d_ptr->datasets) {
|
||||
if (!item.second) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto p = item.second->hugePages();
|
||||
pages.first += p.first;
|
||||
pages.second += p.second;
|
||||
}
|
||||
|
||||
d_ptr->unlock();
|
||||
|
||||
return pages;
|
||||
}
|
||||
|
||||
|
||||
void xmrig::Rx::init(const Job &job, int initThreads, bool hugePages, bool numa)
|
||||
{
|
||||
if (job.algorithm().family() != Algorithm::RANDOM_X) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue