Added command line options --cache-qos (--randomx-cache-qos) and --argon2-impl (--cpu-argon2-impl).

This commit is contained in:
XMRig 2020-07-20 09:17:59 +07:00
parent 1ec185a3a0
commit 70c7f33a20
No known key found for this signature in database
GPG key ID: 446A53638BE94409
6 changed files with 25 additions and 7 deletions

View file

@ -101,6 +101,8 @@ public:
YieldKey = 1030,
AstroBWTMaxSizeKey = 1034,
AstroBWTAVX2Key = 1036,
Argon2ImplKey = 1039,
RandomXCacheQoSKey = 1040,
// xmrig amd
OclPlatformKey = 1400,

View file

@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -151,6 +151,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
case IConfig::YieldKey: /* --cpu-no-yield */
return set(doc, kCpu, "yield", false);
case IConfig::Argon2ImplKey: /* --argon2-impl */
return set(doc, kCpu, "argon2-impl", arg);
# ifdef XMRIG_FEATURE_ASM
case IConfig::AssemblyKey: /* --asm */
return set(doc, kCpu, "asm", arg);
@ -186,6 +189,9 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
case IConfig::RandomXRdmsrKey: /* --randomx-no-rdmsr */
return set(doc, kRandomX, "rdmsr", false);
case IConfig::RandomXCacheQoSKey: /* --cache-qos */
return set(doc, kRandomX, "cache_qos", true);
# endif
# ifdef XMRIG_FEATURE_OPENCL

View file

@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View file

@ -87,6 +87,9 @@ static const option options[] = {
{ "cpu-max-threads-hint", 1, nullptr, IConfig::CPUMaxThreadsKey },
{ "cpu-memory-pool", 1, nullptr, IConfig::MemoryPoolKey },
{ "cpu-no-yield", 0, nullptr, IConfig::YieldKey },
{ "no-yield", 0, nullptr, IConfig::YieldKey },
{ "cpu-argon2-impl", 1, nullptr, IConfig::Argon2ImplKey },
{ "argon2-impl", 1, nullptr, IConfig::Argon2ImplKey },
{ "verbose", 0, nullptr, IConfig::VerboseKey },
{ "proxy", 1, nullptr, IConfig::ProxyKey },
{ "data-dir", 1, nullptr, IConfig::DataDirKey },
@ -116,6 +119,8 @@ static const option options[] = {
{ "wrmsr", 2, nullptr, IConfig::RandomXWrmsrKey },
{ "randomx-no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey },
{ "no-rdmsr", 0, nullptr, IConfig::RandomXRdmsrKey },
{ "randomx-cache-qos", 0, nullptr, IConfig::RandomXCacheQoSKey },
{ "cache-qos", 0, nullptr, IConfig::RandomXCacheQoSKey },
# endif
#ifdef XMRIG_ALGO_ASTROBWT
{ "astrobwt-max-size", 1, nullptr, IConfig::AstroBWTMaxSizeKey },

View file

@ -69,7 +69,7 @@ static inline const std::string &usage()
u += " -r, --retries=N number of times to retry before switch to backup server (default: 5)\n";
u += " -R, --retry-pause=N time to pause between retries (default: 5)\n";
u += " --user-agent set custom user-agent string for pool\n";
u += " --donate-level=N donate level, default 5%% (5 minutes in 100 minutes)\n";
u += " --donate-level=N donate level, default 1%% (1 minute in 100 minutes)\n";
u += " --donate-over-proxy=N control donate over xmrig-proxy feature\n";
u += "\nCPU backend:\n";
@ -85,6 +85,10 @@ static inline const std::string &usage()
u += " --no-huge-pages disable huge pages support\n";
u += " --asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer\n";
# if defined(__x86_64__) || defined(_M_AMD64)
u += " --argon2-impl=IMPL argon2 implementation: x86_64, SSE2, SSSE3, XOP, AVX2, AVX-512F\n";
# endif
# ifdef XMRIG_ALGO_RANDOMX
u += " --randomx-init=N threads count to initialize RandomX dataset\n";
u += " --randomx-no-numa disable NUMA support for RandomX\n";
@ -92,6 +96,7 @@ static inline const std::string &usage()
u += " --randomx-1gb-pages use 1GB hugepages for dataset (Linux only)\n";
u += " --randomx-wrmsr=N write custom value (0-15) to Intel MSR register 0x1a4 or disable MSR mod (-1)\n";
u += " --randomx-no-rdmsr disable reverting initial MSR values on exit\n";
u += " --randomx-cache-qos enable Cache QoS\n";
# endif
# ifdef XMRIG_ALGO_ASTROBWT

View file

@ -72,8 +72,8 @@ bool xmrig::argon2::Impl::select(const String &nameHint, bool benchmark)
}
}
if (hint.isEmpty() || argon2_select_impl_by_name(hint) == 0) {
argon2_select_impl();
if (!hint.isEmpty()) {
argon2_select_impl_by_name(hint);
}
# endif