Merge xmrig v6.16.3 into master

This commit is contained in:
MoneroOcean 2022-01-25 18:56:52 +00:00
commit 2a53e73ed5
18 changed files with 159 additions and 48 deletions

View file

@ -821,7 +821,7 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si
int64_t d5;
# if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 8))
# if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 8)) || !defined(XMRIG_64_BIT)
d5 = d | 5;
# else
// Workaround for stupid GCC which converts to 32 bit before doing "| 5" and then converts back to 64 bit

View file

@ -344,7 +344,7 @@ typedef union ALIGN_STRUCT(16) SIMDVec {
// Older gcc does not define vld1q_u8_x4 type
#if defined(__GNUC__) && !defined(__clang__) && \
((__GNUC__ <= 10 && defined(__arm__)) || \
((__GNUC__ <= 11 && defined(__arm__)) || \
(__GNUC__ == 10 && __GNUC_MINOR__ < 3 && defined(__aarch64__)) || \
(__GNUC__ <= 9 && defined(__aarch64__)))
FORCE_INLINE uint8x16x4_t _sse2neon_vld1q_u8_x4(const uint8_t *p)

View file

@ -6,12 +6,12 @@ No tuning is required - auto-config works well on most CPUs!
### Sample command line (non-SSL port)
```
xmrig -a gr -o raptoreumemporium.com:3008 -u WALLET_ADDRESS
xmrig -a gr -o raptoreumemporium.com:3008 -u WALLET_ADDRESS -p x
```
### Sample command line (SSL port)
```
xmrig -a gr -o us.flockpool.com:5555 --tls -u WALLET_ADDRESS
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).

View file

@ -166,7 +166,7 @@ static struct AlgoTune
struct HelperThread
{
HelperThread(hwloc_bitmap_t cpu_set, bool is8MB) : m_cpuSet(cpu_set), m_is8MB(is8MB)
HelperThread(hwloc_bitmap_t cpu_set, int priority, bool is8MB) : m_cpuSet(cpu_set), m_priority(priority), m_is8MB(is8MB)
{
uv_mutex_init(&m_mutex);
uv_cond_init(&m_cond);
@ -241,6 +241,8 @@ struct HelperThread
}
}
Platform::setThreadPriority(m_priority);
uv_mutex_lock(&m_mutex);
m_ready = true;
@ -268,6 +270,7 @@ struct HelperThread
volatile bool m_ready = false;
volatile bool m_finished = false;
hwloc_bitmap_t m_cpuSet = {};
int m_priority = -1;
bool m_is8MB = false;
std::thread* m_thread = nullptr;
@ -290,13 +293,14 @@ void benchmark()
hwloc_obj_t pu = hwloc_get_pu_obj_by_os_index(topology, thread_index1);
hwloc_obj_t pu2;
hwloc_get_closest_objs(topology, pu, &pu2, 1);
uint32_t thread_index2 = pu2->os_index;
uint32_t thread_index2 = pu2 ? pu2->os_index : thread_index1;
if (thread_index2 < thread_index1) {
std::swap(thread_index1, thread_index2);
}
Platform::setThreadAffinity(thread_index1);
Platform::setThreadPriority(3);
constexpr uint32_t N = 1U << 21;
@ -375,7 +379,7 @@ void benchmark()
hwloc_bitmap_t helper_set = hwloc_bitmap_alloc();
hwloc_bitmap_set(helper_set, thread_index2);
HelperThread* helper = new HelperThread(helper_set, false);
HelperThread* helper = new HelperThread(helper_set, 3, false);
for (uint32_t algo = 0; algo < 6; ++algo) {
for (uint64_t step : { 1, 2, 4}) {
@ -465,7 +469,7 @@ static inline bool findByType(hwloc_obj_t obj, hwloc_obj_type_t type, func lambd
}
HelperThread* create_helper_thread(int64_t cpu_index, const std::vector<int64_t>& affinities)
HelperThread* create_helper_thread(int64_t cpu_index, int priority, const std::vector<int64_t>& affinities)
{
#ifndef XMRIG_ARM
hwloc_bitmap_t helper_cpu_set = hwloc_bitmap_alloc();
@ -520,7 +524,7 @@ HelperThread* create_helper_thread(int64_t cpu_index, const std::vector<int64_t>
});
if (hwloc_bitmap_weight(helper_cpu_set) > 0) {
return new HelperThread(helper_cpu_set, is8MB);
return new HelperThread(helper_cpu_set, priority, is8MB);
}
}
}
@ -761,7 +765,7 @@ void hash_octa(const uint8_t* data, size_t size, uint8_t* output, cryptonight_ct
void benchmark() {}
HelperThread* create_helper_thread(int64_t, const std::vector<int64_t>&) { return nullptr; }
HelperThread* create_helper_thread(int64_t, int, const std::vector<int64_t>&) { return nullptr; }
void destroy_helper_thread(HelperThread*) {}

View file

@ -39,7 +39,7 @@ namespace ghostrider
struct HelperThread;
void benchmark();
HelperThread* create_helper_thread(int64_t cpu_index, const std::vector<int64_t>& affinities);
HelperThread* create_helper_thread(int64_t cpu_index, int priority, const std::vector<int64_t>& affinities);
void destroy_helper_thread(HelperThread* t);
void hash_octa(const uint8_t* data, size_t size, uint8_t* output, cryptonight_ctx** ctx, HelperThread* helper, bool verbose = true);

View file

@ -154,6 +154,8 @@ void xmrig::RxQueue::backgroundInit()
continue;
}
// Update seed here again in case there was more than one item in the queue
m_seed = item.seed;
m_state = STATE_IDLE;
m_async->send();
}