diff --git a/src/base/kernel/interfaces/IConfig.h b/src/base/kernel/interfaces/IConfig.h index e531353a..bc460786 100644 --- a/src/base/kernel/interfaces/IConfig.h +++ b/src/base/kernel/interfaces/IConfig.h @@ -86,6 +86,7 @@ public: DnsTtlKey = 1054, SpendSecretKey = 1055, DaemonZMQPortKey = 1056, + HugePagesJitKey = 1057, // xmrig common CPUPriorityKey = 1021, diff --git a/src/core/config/ConfigTransform.cpp b/src/core/config/ConfigTransform.cpp index c854d982..1c4f4244 100644 --- a/src/core/config/ConfigTransform.cpp +++ b/src/core/config/ConfigTransform.cpp @@ -195,6 +195,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const case IConfig::RandomXCacheQoSKey: /* --cache-qos */ return set(doc, RxConfig::kField, RxConfig::kCacheQoS, true); + + case IConfig::HugePagesJitKey: /* --huge-pages-jit */ + return set(doc, CpuConfig::kField, CpuConfig::kHugePagesJit, true); # endif # ifdef XMRIG_FEATURE_OPENCL diff --git a/src/core/config/Config_platform.h b/src/core/config/Config_platform.h index 7194f5cc..c4379d0b 100644 --- a/src/core/config/Config_platform.h +++ b/src/core/config/Config_platform.h @@ -69,6 +69,8 @@ static const option options[] = { { "no-huge-pages", 0, nullptr, IConfig::HugePagesKey }, { "no-hugepages", 0, nullptr, IConfig::HugePagesKey }, { "hugepage-size", 1, nullptr, IConfig::HugePageSizeKey }, + { "huge-pages-jit", 0, nullptr, IConfig::HugePagesJitKey }, + { "hugepages-jit", 0, nullptr, IConfig::HugePagesJitKey }, { "pass", 1, nullptr, IConfig::PasswordKey }, { "print-time", 1, nullptr, IConfig::PrintTimeKey }, { "retries", 1, nullptr, IConfig::RetriesKey }, diff --git a/src/core/config/usage.h b/src/core/config/usage.h index 4230c9e2..6cd599c9 100644 --- a/src/core/config/usage.h +++ b/src/core/config/usage.h @@ -88,6 +88,9 @@ static inline const std::string &usage() u += " --no-huge-pages disable huge pages support\n"; # ifdef XMRIG_OS_LINUX u += " --hugepage-size=N custom hugepage size in kB\n"; +# endif +# ifdef XMRIG_ALGO_RANDOMX + u += " --huge-pages-jit enable huge pages support for RandomX JIT code\n"; # endif u += " --asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer\n";