Merge xmrig v6.22.0 into master

This commit is contained in:
MoneroOcean 2024-08-12 00:05:37 +03:00
commit 90ba7c93de
41 changed files with 4531 additions and 4174 deletions

View file

@ -16,7 +16,7 @@ xmrig -a gr -o rtm.suprnova.cc:4273 --tls -u WALLET_ADDRESS -p x
You can use **rtm_ghostrider_example.cmd** as a template and put pool URL and your wallet address there. The general XMRig documentation is available [here](https://xmrig.com/docs/miner).
**Using `--threads` or `-t` option is NOT recommended because it turns off advanced built-in config.** If you want to tweak the nubmer of threads used for GhostRider, it's recommended to start using config.json instead of command line. The best suitable command line option for this is `--cpu-max-threads-hint=N` where N can be between 0 and 100.
**Using `--threads` or `-t` option is NOT recommended because it turns off advanced built-in config.** If you want to tweak the number of threads used for GhostRider, it's recommended to start using config.json instead of command line. The best suitable command line option for this is `--cpu-max-threads-hint=N` where N can be between 0 and 100.
## Performance

View file

@ -94,7 +94,7 @@ static size_t CalcDatasetItemSize()
// Main loop prologue
((uint8_t*)randomx_calc_dataset_item_aarch64_mix - ((uint8_t*)randomx_calc_dataset_item_aarch64_prefetch)) + 4 +
// Inner main loop (instructions)
((RandomX_ConfigurationBase::SuperscalarLatency * 3) + 2) * 16 +
((RandomX_ConfigurationBase::SuperscalarMaxLatency * 3) + 2) * 16 +
// Main loop epilogue
((uint8_t*)randomx_calc_dataset_item_aarch64_store_result - (uint8_t*)randomx_calc_dataset_item_aarch64_mix) + 4
) +

View file

@ -266,6 +266,10 @@ namespace randomx {
// AVX2 init is slower on Zen4
initDatasetAVX2 = false;
break;
case xmrig::ICpuInfo::ARCH_ZEN5:
// TODO: test it
initDatasetAVX2 = false;
break;
}
}
}

View file

@ -115,11 +115,11 @@ RandomX_ConfigurationSafex::RandomX_ConfigurationSafex()
ArgonSalt = "RandomSFX\x01";
}
RandomX_ConfigurationKeva::RandomX_ConfigurationKeva()
RandomX_ConfigurationYada::RandomX_ConfigurationYada()
{
ArgonSalt = "RandomKV\x01";
ScratchpadL2_Size = 131072;
ScratchpadL3_Size = 1048576;
ArgonSalt = "RandomXYadaCoin\x03";
SuperscalarLatency = 150;
ArgonIterations = 4;
}
RandomX_ConfigurationScala::RandomX_ConfigurationScala()
@ -147,6 +147,7 @@ RandomX_ConfigurationBase::RandomX_ConfigurationBase()
, ArgonIterations(3)
, ArgonLanes(1)
, ArgonSalt("RandomX\x03")
, SuperscalarLatency(170)
, ScratchpadL1_Size(16384)
, ScratchpadL2_Size(262144)
, ScratchpadL3_Size(2097152)
@ -411,6 +412,7 @@ RandomX_ConfigurationGraft RandomX_GraftConfig;
RandomX_ConfigurationSafex RandomX_SafexConfig;
RandomX_ConfigurationKeva RandomX_KevaConfig;
RandomX_ConfigurationScala RandomX_ScalaConfig;
RandomX_ConfigurationYada RandomX_YadaConfig;
alignas(64) RandomX_ConfigurationBase RandomX_CurrentConfig;

View file

@ -83,6 +83,7 @@ struct RandomX_ConfigurationBase
uint32_t ArgonIterations;
uint32_t ArgonLanes;
const char* ArgonSalt;
uint32_t SuperscalarLatency;
uint32_t ScratchpadL1_Size;
uint32_t ScratchpadL2_Size;
@ -157,6 +158,7 @@ struct RandomX_ConfigurationGraft : public RandomX_ConfigurationBase { RandomX_C
struct RandomX_ConfigurationSafex : public RandomX_ConfigurationBase { RandomX_ConfigurationSafex(); };
struct RandomX_ConfigurationKeva : public RandomX_ConfigurationBase { RandomX_ConfigurationKeva(); };
struct RandomX_ConfigurationScala : public RandomX_ConfigurationBase { RandomX_ConfigurationScala(); };
struct RandomX_ConfigurationYada : public RandomX_ConfigurationBase { RandomX_ConfigurationYada(); };
extern RandomX_ConfigurationMonero RandomX_MoneroConfig;
extern RandomX_ConfigurationWownero RandomX_WowneroConfig;
@ -166,6 +168,7 @@ extern RandomX_ConfigurationGraft RandomX_GraftConfig;
extern RandomX_ConfigurationSafex RandomX_SafexConfig;
extern RandomX_ConfigurationKeva RandomX_KevaConfig;
extern RandomX_ConfigurationScala RandomX_ScalaConfig;
extern RandomX_ConfigurationYada RandomX_YadaConfig;
extern RandomX_ConfigurationBase RandomX_CurrentConfig;

View file

@ -48,8 +48,8 @@ const RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
case Algorithm::RX_SFX:
return &RandomX_SafexConfig;
case Algorithm::RX_KEVA:
return &RandomX_KevaConfig;
case Algorithm::RX_YADA:
return &RandomX_YadaConfig;
case Algorithm::RX_XLA:
return &RandomX_ScalaConfig;

View file

@ -53,13 +53,17 @@ static const std::array<const char *, RxConfig::ModeMax> modeNames = { "auto", "
#ifdef XMRIG_FEATURE_MSR
constexpr size_t kMsrArraySize = 6;
constexpr size_t kMsrArraySize = 7;
static const std::array<MsrItems, kMsrArraySize> msrPresets = {
MsrItems(),
MsrItems{{ 0xC0011020, 0ULL }, { 0xC0011021, 0x40ULL, ~0x20ULL }, { 0xC0011022, 0x1510000ULL }, { 0xC001102b, 0x2000cc16ULL }},
MsrItems{{ 0xC0011020, 0x0004480000000000ULL }, { 0xC0011021, 0x001c000200000040ULL, ~0x20ULL }, { 0xC0011022, 0xc000000401570000ULL }, { 0xC001102b, 0x2000cc10ULL }},
MsrItems{{ 0xC0011020, 0x0004400000000000ULL }, { 0xC0011021, 0x0004000000000040ULL, ~0x20ULL }, { 0xC0011022, 0x8680000401570000ULL }, { 0xC001102b, 0x2040cc10ULL }},
// TODO: Tune it for Zen5 when it's available
MsrItems{{ 0xC0011020, 0x0004400000000000ULL }, { 0xC0011021, 0x0004000000000040ULL, ~0x20ULL }, { 0xC0011022, 0x8680000401570000ULL }, { 0xC001102b, 0x2040cc10ULL }},
MsrItems{{ 0x1a4, 0xf }},
MsrItems()
};