Merge xmrig v6.8.1 into master

This commit is contained in:
MoneroOcean 2021-02-03 01:15:49 +00:00
commit 6cc0c74351
26 changed files with 342 additions and 200 deletions

View file

@ -50,7 +50,7 @@ int xmrig::Controller::init()
{
Base::init();
VirtualMemory::init(config()->cpu().memPoolSize(), config()->cpu().isHugePages());
VirtualMemory::init(config()->cpu().memPoolSize(), config()->cpu().hugePageSize());
m_network = std::make_shared<Network>(this);

View file

@ -125,9 +125,10 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
BaseTransform::transform(doc, key, arg);
switch (key) {
case IConfig::AVKey: /* --av */
case IConfig::CPUPriorityKey: /* --cpu-priority */
case IConfig::ThreadsKey: /* --threads */
case IConfig::AVKey: /* --av */
case IConfig::CPUPriorityKey: /* --cpu-priority */
case IConfig::ThreadsKey: /* --threads */
case IConfig::HugePageSizeKey: /* --hugepage-size */
return transformUint64(doc, key, static_cast<uint64_t>(strtol(arg, nullptr, 10)));
case IConfig::HugePagesKey: /* --no-huge-pages */
@ -149,8 +150,10 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
case IConfig::YieldKey: /* --cpu-no-yield */
return set(doc, CpuConfig::kField, CpuConfig::kYield, false);
# ifdef XMRIG_ALGO_ARGON2
case IConfig::Argon2ImplKey: /* --argon2-impl */
return set(doc, CpuConfig::kField, CpuConfig::kArgon2Impl, arg);
# endif
# ifdef XMRIG_FEATURE_ASM
case IConfig::AssemblyKey: /* --asm */
@ -304,6 +307,9 @@ void xmrig::ConfigTransform::transformUint64(rapidjson::Document &doc, int key,
case IConfig::CPUPriorityKey: /* --cpu-priority */
return set(doc, CpuConfig::kField, CpuConfig::kPriority, arg);
case IConfig::HugePageSizeKey: /* --hugepage-size */
return set(doc, CpuConfig::kField, CpuConfig::kHugePages, arg);
default:
break;
}

View file

@ -75,6 +75,8 @@ static const option options[] = {
# endif
{ "no-color", 0, nullptr, IConfig::ColorKey },
{ "no-huge-pages", 0, nullptr, IConfig::HugePagesKey },
{ "no-hugepages", 0, nullptr, IConfig::HugePagesKey },
{ "hugepage-size", 1, nullptr, IConfig::HugePageSizeKey },
{ "pass", 1, nullptr, IConfig::PasswordKey },
{ "print-time", 1, nullptr, IConfig::PrintTimeKey },
{ "retries", 1, nullptr, IConfig::RetriesKey },

View file

@ -83,6 +83,9 @@ static inline const std::string &usage()
u += " --cpu-memory-pool=N number of 2 MB pages for persistent memory pool, -1 (auto), 0 (disable)\n";
u += " --cpu-no-yield prefer maximum hashrate rather than system response/stability\n";
u += " --no-huge-pages disable huge pages support\n";
# ifdef XMRIG_OS_LINUX
u += " --hugepage-size=N custom hugepage size in kB\n";
# endif
u += " --asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer\n";
# if defined(__x86_64__) || defined(_M_AMD64)
@ -155,7 +158,7 @@ static inline const std::string &usage()
u += " -l, --log-file=FILE log all output to a file\n";
u += " --print-time=N print hashrate report every N seconds\n";
# ifdef XMRIG_FEATURE_NVML
# if defined(XMRIG_FEATURE_NVML) || defined(XMRIG_FEATURE_ADL)
u += " --health-print-time=N print health report every N seconds\n";
# endif
u += " --no-color disable colored output\n";