mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-22 18:54:43 +00:00
Cache QoS: fix for seting MSR
This commit is contained in:
parent
c83429c55c
commit
72c385c870
2 changed files with 10 additions and 2 deletions
|
@ -221,7 +221,10 @@ static bool wrmsr(const MsrItems& preset, const std::vector<CpuThread>& threads,
|
|||
else {
|
||||
// Disable L3 cache for Class Of Service 1
|
||||
if (!wrmsr_on_cpu(0xC91, cpu, 0, MsrItem::kNoMask)) {
|
||||
return false;
|
||||
// Some CPUs don't let set it to all zeros
|
||||
if (!wrmsr_on_cpu(0xC91, cpu, 1, MsrItem::kNoMask)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Assign Class Of Service 1 to current CPU core
|
||||
|
|
|
@ -324,7 +324,12 @@ static bool wrmsr(const MsrItems &preset, const std::vector<CpuThread>& threads,
|
|||
}
|
||||
else {
|
||||
// Disable L3 cache for Class Of Service 1
|
||||
success &= wrmsr(driver, 0xC91, 0, MsrItem::kNoMask);
|
||||
if (!wrmsr(driver, 0xC91, 0, MsrItem::kNoMask)) {
|
||||
// Some CPUs don't let set it to all zeros
|
||||
if (!wrmsr(driver, 0xC91, 1, MsrItem::kNoMask)) {
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Assign Class Of Service 1 to current CPU core
|
||||
success &= wrmsr(driver, 0xC8F, 1ULL << 32, MsrItem::kNoMask);
|
||||
|
|
Loading…
Reference in a new issue