From 3ad6ab56a5dd1faddca66287b3d750eb8022addd Mon Sep 17 00:00:00 2001 From: SChernykh Date: Thu, 17 Nov 2022 23:24:28 +0100 Subject: [PATCH] Improved Zen 3 MSR mod +0.5% speedup on Ryzen 5 5600X --- scripts/randomx_boost.sh | 4 ++-- src/crypto/rx/RxConfig.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/randomx_boost.sh b/scripts/randomx_boost.sh index f9f3ac2e9..adfc4bdf5 100755 --- a/scripts/randomx_boost.sh +++ b/scripts/randomx_boost.sh @@ -24,8 +24,8 @@ if grep -E 'AMD Ryzen|AMD EPYC' /proc/cpuinfo > /dev/null; echo "Detected Zen3 CPU" wrmsr -a 0xc0011020 0x4480000000000 wrmsr -a 0xc0011021 0x1c000200000040 - wrmsr -a 0xc0011022 0xc000000401500000 - wrmsr -a 0xc001102b 0x2000cc14 + wrmsr -a 0xc0011022 0xc000000401570000 + wrmsr -a 0xc001102b 0x2000cc10 echo "MSR register values for Zen3 applied" fi else diff --git a/src/crypto/rx/RxConfig.cpp b/src/crypto/rx/RxConfig.cpp index 362876071..775c93269 100644 --- a/src/crypto/rx/RxConfig.cpp +++ b/src/crypto/rx/RxConfig.cpp @@ -63,7 +63,7 @@ constexpr size_t kMsrArraySize = 6; static const std::array msrPresets = { MsrItems(), MsrItems{{ 0xC0011020, 0ULL }, { 0xC0011021, 0x40ULL, ~0x20ULL }, { 0xC0011022, 0x1510000ULL }, { 0xC001102b, 0x2000cc16ULL }}, - MsrItems{{ 0xC0011020, 0x0004480000000000ULL }, { 0xC0011021, 0x001c000200000040ULL, ~0x20ULL }, { 0xC0011022, 0xc000000401500000ULL }, { 0xC001102b, 0x2000cc14ULL }}, + MsrItems{{ 0xC0011020, 0x0004480000000000ULL }, { 0xC0011021, 0x001c000200000040ULL, ~0x20ULL }, { 0xC0011022, 0xc000000401570000ULL }, { 0xC001102b, 0x2000cc10ULL }}, MsrItems{{ 0xC0011020, 0x0004400000000000ULL }, { 0xC0011021, 0x0004000000000040ULL, ~0x20ULL }, { 0xC0011022, 0x8680000401570000ULL }, { 0xC001102b, 0x2040cc10ULL }}, MsrItems{{ 0x1a4, 0xf }}, MsrItems()