mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 03:59:41 +00:00
Merge pull request #3031 from SChernykh/dev
Fixed --cpu-priority not working sometimes
This commit is contained in:
commit
1ae9a4e428
1 changed files with 6 additions and 4 deletions
|
@ -319,16 +319,18 @@ void xmrig::ConfigTransform::transformUint64(rapidjson::Document &doc, int key,
|
||||||
#ifdef XMRIG_FEATURE_BENCHMARK
|
#ifdef XMRIG_FEATURE_BENCHMARK
|
||||||
void xmrig::ConfigTransform::transformBenchmark(rapidjson::Document &doc, int key, const char *arg)
|
void xmrig::ConfigTransform::transformBenchmark(rapidjson::Document &doc, int key, const char *arg)
|
||||||
{
|
{
|
||||||
set(doc, CpuConfig::kField, CpuConfig::kHugePagesJit, true);
|
|
||||||
set(doc, CpuConfig::kField, CpuConfig::kPriority, 2);
|
|
||||||
set(doc, CpuConfig::kField, CpuConfig::kYield, false);
|
|
||||||
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case IConfig::AlgorithmKey: /* --algo */
|
case IConfig::AlgorithmKey: /* --algo */
|
||||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kAlgo, arg);
|
return set(doc, BenchConfig::kBenchmark, BenchConfig::kAlgo, arg);
|
||||||
|
|
||||||
case IConfig::BenchKey: /* --bench */
|
case IConfig::BenchKey: /* --bench */
|
||||||
|
{
|
||||||
|
// CPU settings for the benchmark
|
||||||
|
set(doc, CpuConfig::kField, CpuConfig::kHugePagesJit, true);
|
||||||
|
set(doc, CpuConfig::kField, CpuConfig::kPriority, 2);
|
||||||
|
set(doc, CpuConfig::kField, CpuConfig::kYield, false);
|
||||||
return set(doc, BenchConfig::kBenchmark, BenchConfig::kSize, arg);
|
return set(doc, BenchConfig::kBenchmark, BenchConfig::kSize, arg);
|
||||||
|
}
|
||||||
|
|
||||||
case IConfig::StressKey: /* --stress */
|
case IConfig::StressKey: /* --stress */
|
||||||
return add(doc, Pools::kPools, Pool::kUser, BenchConfig::kBenchmark);
|
return add(doc, Pools::kPools, Pool::kUser, BenchConfig::kBenchmark);
|
||||||
|
|
Loading…
Reference in a new issue