Merge pull request #1416 from SChernykh/dev

Fixed thread count for MSR mod
This commit is contained in:
xmrig 2019-12-14 22:41:00 +07:00 committed by GitHub
commit 1ad6b5504c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,7 +190,7 @@ void xmrig::Rx::osInit(const RxConfig &config)
LOG_INFO(CLEAR "%s" GREEN_BOLD_S "MSR mod: setting MSR register values for %s", xmrig::rx_tag(), msr_mod_variant); LOG_INFO(CLEAR "%s" GREEN_BOLD_S "MSR mod: setting MSR register values for %s", xmrig::rx_tag(), msr_mod_variant);
std::thread wrmsr_thread([hDriver, &config]() { std::thread wrmsr_thread([hDriver, &config]() {
for (uint32_t i = 0, n = std::thread::hardware_concurrency(); i < n; ++i) { for (uint32_t i = 0, n = Cpu::info()->threads(); i < n; ++i) {
Platform::setThreadAffinity(i); Platform::setThreadAffinity(i);
if (Cpu::info()->assembly() == Assembly::RYZEN) { if (Cpu::info()->assembly() == Assembly::RYZEN) {
wrmsr(hDriver, 0xC0011020, 0); wrmsr(hDriver, 0xC0011020, 0);