This commit is contained in:
MoneroOcean 2019-12-14 09:24:11 -08:00
commit 01e2945ab7
125 changed files with 4772 additions and 2073 deletions

View file

@ -234,10 +234,7 @@ public:
# ifdef XMRIG_ALGO_RANDOMX
inline bool initRX()
{
return Rx::init(job, controller->config()->rx(), controller->config()->cpu().isHugePages());
}
inline bool initRX() { return Rx::init(job, controller->config()->rx(), controller->config()->cpu()); }
# endif

View file

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

View file

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

View file

@ -88,6 +88,8 @@ static inline const std::string &usage()
u += " --randomx-init=N threads count to initialize RandomX dataset\n";
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