Added RandomX option "wrmsr" with command line equivalent --randomx-wrmsr=N.

This commit is contained in:
XMRig 2019-12-10 23:57:29 +07:00
parent 3b4b230cab
commit 96cfdda9a1
No known key found for this signature in database
GPG key ID: 446A53638BE94409
14 changed files with 257 additions and 192 deletions

View file

@ -168,6 +168,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
case IConfig::RandomX1GbPagesKey: /* --randomx-1gb-pages */
return set(doc, kRandomX, "1gb-pages", true);
case IConfig::RandomXWrmsrKey: /* --randomx-wrmsr */
return set(doc, kRandomX, "wrmsr", static_cast<int64_t>(strtol(arg, nullptr, 10)));
# endif
# ifdef XMRIG_FEATURE_OPENCL

View file

@ -100,6 +100,7 @@ static const option options[] = {
{ "randomx-mode", 1, nullptr, IConfig::RandomXModeKey },
{ "randomx-1gb-pages", 0, nullptr, IConfig::RandomX1GbPagesKey },
{ "1gb-pages", 0, nullptr, IConfig::RandomX1GbPagesKey },
{ "randomx-wrmsr", 1, nullptr, IConfig::RandomXWrmsrKey },
# endif
# ifdef XMRIG_FEATURE_OPENCL
{ "opencl", 0, nullptr, IConfig::OclKey },

View file

@ -89,6 +89,7 @@ static inline const std::string &usage()
u += " --randomx-no-numa disable NUMA support for RandomX\n";
u += " --randomx-mode=MODE RandomX mode: auto, fast, light\n";
u += " --randomx-1gb-pages use 1GB hugepages for dataset (Linux only)\n";
u += " --randomx-wrmsr=N write value (0-15) to Intel MSR register 0x1a4 or do nothing (-1) (Linux only)\n";
# endif
# ifdef XMRIG_FEATURE_HTTP