Commit Graph
100 Commits
Author SHA1 Message Date
SChernykh 2ef064da60 Don't use RandomX JIT if WITH_ASM=OFF
Because RandomX JIT use asm code
2021-04-02 10:05:46 +02:00
SChernykh f6232d0753 Optimize cn-heavy in GCC builds
+0.7% in GCC builds, but GCC is still slower than MSVC on cn-heavy.
2021-03-28 16:12:09 +02:00
SChernykh f4a43bb4b0 Optimized cn-heavy
- Remove unnecessary type conversion when doing `idx0 = d ^ q;`
- Saves 1 CPU cycle in the main loop
- 0.2% speedup on Ryzen 5 5600X, results on other CPUs may vary
2021-03-27 22:21:01 +01:00
SChernykh d806f16e10 Fixed use-after-free bug when exiting 2021-03-27 21:53:40 +01:00
SChernykh 4b270047fe Fix vld1q_u8_x4 compilation error with GCC 10.2 2021-03-12 16:26:02 +01:00
SChernykh 27df18b442 Fix wrong type in Handle::deleteLater()
Bug found by Address Sanitizer
2021-03-10 14:55:06 +01:00
SChernykh 23d2826dc4 Fix GCC compilation 2021-03-04 10:45:39 +01:00
SChernykh 42fe175a7c Fix crash in cn-heavy on Zen3 with manual thread count 2021-03-04 10:02:35 +01:00
SChernykh 34c2c161b5 Fixed many "new job" messages when solo mining
Fix for https://github.com/xmrig/xmrig/issues/2127
2021-03-01 17:46:05 +01:00
SChernykh ca2ca9a2dd Fixed pause logic when both pause on battery and user activity are enabled 2021-02-21 16:33:57 +01:00
SChernykh 83ccef753a Fixed crash when GPU mining cn-heavy on Zen3 system 2021-02-18 14:49:37 +01:00
SChernykh fdd7a1969a Added pause-on-active option
Windows only for now. When set to true, pauses mining when user touches mouse or keyboard.
2021-02-14 15:32:18 +01:00
SChernykh f36b4e36b1 Cryptonight: add prefetching to interleaved mode 2021-02-07 23:29:54 +01:00
SChernykh 3e9755c8c8 Optimized cn-heavy for Zen3
- Uses scratchpad interleaving to access only the closest L3 slice from each CPU core.
- Also activates MSR mod for cn-heavy because CPU prefetchers get confused with interleaving
- 7-8% speedup on Zen3
2021-02-07 22:05:11 +01:00
SChernykh 3f8732e593 Fix compile error in Termux 2021-02-03 19:05:05 +01:00
SChernykh 771fb40eca Update jit_compiler_a64.cpp 2021-02-01 22:52:02 +01:00
SChernykh e92767eed5 ARM JIT: added missing cache flush 2021-02-01 22:42:35 +01:00
SChernykh 826e540f15 Fixed code allocation for ARM 2021-02-01 22:36:11 +01:00
SChernykh e3828a13f9 Fixed crashes on ARM 2021-02-01 17:07:45 +01:00
SChernykh 3e3e008761 Fix compilation error when RandomX and Argon2 are disabled 2021-01-28 14:38:28 +01:00
SChernykh d55f365276 Added documentation for config.json CPU options 2021-01-28 13:37:27 +01:00
SChernykh 787aad0d62 RandomX JIT x86: remove unnecessary instructions
Adopted from https://github.com/tevador/RandomX/pull/201
2021-01-23 22:28:50 +01:00
SChernykh 54aa76b09b Always use cvt_bin2hex 2021-01-15 12:46:27 +01:00
SChernykh bf32afbb05 Fixed solo mining
It was broken since 6.7.0
2021-01-15 11:18:36 +01:00
SChernykh fac3902ae1 RandomX x86 JIT: remove redundant CFROUND 2021-01-07 16:20:00 +01:00
SChernykh 01d731ea5a AstroBWT OpenCL fixes
- Rewrote main BWT kernel to work properly on Navi
- Fixed nonce iterations in OclWorker
- Fixed memory allocation for AstroBWT
2020-12-27 16:44:35 +01:00
SChernykh ac77335519 Show hashrate in the benchmark finished message 2020-12-23 14:31:38 +01:00
SChernykh 50cecbb71a Fixed broken Dero solo mining 2020-12-20 22:17:08 +01:00
SChernykh 90760db1c9 Fix GCC warning 2020-12-19 19:50:52 +01:00
SChernykh 7d92d57059 Another dataset AVX2 init speedup (+3.8% faster on Zen3) 2020-12-19 19:46:31 +01:00
SChernykh 0319b5b622 Added config option for AVX2 dataset init
-1 = Auto detect
0 = Always disabled
1 = Enabled if AVX2 is supported
2020-12-19 16:18:49 +01:00
SChernykh eae3a62345 Auto-detect the fastest code for dataset init 2020-12-19 13:59:28 +01:00
SChernykh a0db4f8924 Fixed Windows scripts
Change back to script's folder when started as administrator
2020-12-18 16:51:28 +01:00
SChernykh aaf1ed1c99 Dataset initialization with AVX2 (WIP) 2020-12-18 14:53:54 +01:00
SChernykh b89d432b7d Fix alignment for Linux 2020-12-14 18:32:25 +01:00
SChernykh e3dc83e383 Fix: secure JIT and huge pages are incompatible on Windows 2020-12-14 18:22:58 +01:00
SChernykh 83d152f557 More static analysis fixes 2020-12-08 16:05:58 +01:00
SChernykh d5f84a813d Fixed errors found by static analysis 2020-12-08 12:16:59 +01:00
SChernykh 89d6eeae94 Added virtual machine detection 2020-12-06 17:34:01 +01:00
SChernykh 78dba13722 Fix RandomX init when switching to other algo and back 2020-11-29 22:02:48 +01:00
SChernykh dfc4f40026 Optimized JIT compiler
More branch-free code
2020-11-29 14:05:50 +01:00
SChernykh b3c2e60645 Example mining scripts to help new miners 2020-11-26 19:06:46 +01:00
SChernykh 17da388fd2 Added reference hashes for 1T offline benchmark 2020-11-16 00:57:00 +01:00
SChernykh 76c406ce63 Make single thread bench cheat-resistant
Each hash is dependent on the previous hash to make multi-threaded cheating impossible.
2020-11-15 20:38:27 +01:00
SChernykh bdb6fe7d05 Fixed MSR mod names in JSON API 2020-11-14 19:55:43 +01:00
SChernykh 61f65be28b Update randomx_boost.sh 2020-11-12 15:55:27 +01:00
SChernykh 1f9377b9ae Added CPUID info to JSON report 2020-11-10 12:15:52 +01:00
SChernykh 648fa6f164 Separate MSR mod for Zen/Zen2 and Zen3
Another +0.5% speedup for Zen2
2020-11-08 19:40:44 +01:00
SChernykh 3fe06970b0 Update RxConfig.cpp 2020-11-06 22:59:18 +01:00
SChernykh dc2a6ebd32 New MSR mod for Ryzen
+3.5% on Zen2, +1-2% on Zen3
2020-11-06 22:56:09 +01:00
SChernykh 4706136148 Fix compilation on ARMv8 with GCC 9.3.0 2020-11-02 13:50:10 +01:00
SChernykh 21022fe226 Also fix RelWithDebIfno build in Visual Studio 2020-10-27 14:25:43 +01:00
SChernykh d822ffef36 Fixed Debug build in Visual Studio 2020-10-27 14:08:36 +01:00
SChernykh ccf13673aa Fixed roundSize() usage in OCL/CUDA 2020-10-15 14:39:54 +02:00
SChernykh 2ffbf20f20 Make round size power of 2 2020-10-15 14:29:15 +02:00
SChernykh 6078052780 Benchmark: added more check hashes and a progress indicator 2020-10-15 08:23:47 +02:00
SChernykh 04ed885a65 Fixed compile errors in Linux 2020-10-14 21:03:21 +02:00
SChernykh a046437d5f Added benchmark and stress test
Easy to use and zero configuration embedded benchmark/stress test.
2020-10-14 19:45:05 +02:00
SChernykh f8a0aa06c8 Added argon2/chukwav2 algorithm
New Turtlecoin algorithm. Source: https://github.com/turtlecoin/turtlecoin/blob/development/src/crypto/hash.h#L57
2020-10-12 08:26:57 +02:00
SChernykh 1f489ee378 Fixed total hashrate update
Don't add data points where one of the threads doesn't have hashrate data yet.
2020-10-10 17:00:30 +02:00
SChernykh d21a911dd0 Fix HashrateInterpolator::addDataPoint 2020-10-10 11:22:19 +02:00
SChernykh 2af99c3d83 More precise hashrate calculation
- Use only steady timestamp counters to guarantee correctness
- CPU backend: directly measure total hashrate using raw hash counters from each thread; update data more often on ARM CPUs because they're slower
- GPU backends: directly measure total hashrate too, but use interpolator with 4 second lag to fix variance from batches of hashes

Total hashrate is now measured directly (realtime for CPU, 4 seconds lag for GPU), so it might differ a bit from the sum of all thread hashrates because data points are taken at different moments in time.

Overhead is reduced a lot since it doesn't have to go through all threads to calculate max total hashrate on every timer tick (2 times a second).
2020-10-10 11:18:01 +02:00
SChernykh 25d4142e39 Change to fetch_xor to make code simpler 2020-10-09 11:50:11 +02:00
SChernykh 151e1f7d77 Fix possible race condition in hashrate counting code
Use single atomic operation to switch between data points.
2020-10-09 10:29:18 +02:00
SChernykh c370d54e74 Fix 32-bit compilation 2020-10-07 18:19:35 +02:00
SChernykh 7464c4df7c Fixed ARM compilation 2020-10-07 18:09:42 +02:00
SChernykh ba74d14728 Fix FreeBSD compilation 2020-10-07 18:00:36 +02:00
SChernykh 1865d31d0c RandomX: added huge-pages-jit config parameter
Set to false by default, gives 0.2% boost on Ryzen 7 3700X with 16 threads, but hashrate might be unstable on Ryzen between launches. Use with caution.
2020-10-07 17:42:55 +02:00
SChernykh 6a25fa75c7 RandomX: allocate 2 MB pages for generated code, if possible
+0.2% boost on Ryzen 7 3700X
2020-10-07 10:35:10 +02:00
SChernykh d5dd4ce89f RandomX: removed rx/loki
Loki forks to PoS on October 9th.
2020-10-02 17:02:52 +02:00
SChernykh d498274ca9 RandomX: optimized soft AES code
Unrolled loop was 5-10% slower depending on CPU.
2020-09-29 21:22:11 +02:00
SChernykh fbb8e955aa RandomX: removed duplicate constatns in Blake2b 2020-09-27 11:50:08 +02:00
SChernykh 36592c2fe0 RandomX: isolate SSE4.1 code to fix crashes on old CPUs 2020-09-27 11:46:32 +02:00
SChernykh 411ba9f80d Fixed SSE4.1 for old CPUs
Enable SSE4.1 only where it's needed.
2020-09-27 08:55:57 +02:00
SChernykh c07ee768ed KawPow: fixed OpenCL memory leak 2020-09-25 10:53:24 +02:00
SChernykh c4a083aa8c Fix for ARM compilation 2020-09-23 11:44:08 +02:00
SChernykh b8d604bec4 RandomX improved performance of GCC compiled binaries
JIT compilator was slower compared to MSVC compiled binary. Up to +0.1% speedup on rx/wow in Linux.
2020-09-22 13:48:11 +02:00
SChernykh 60faba76e8 RandomX: AES improvements
- A bit faster hardware AES code when compiled with MSVC
- More reliable software AES benchmark
2020-09-21 17:51:08 +02:00
SChernykh e94b92b2aa Fixed Cryptonight OpenCL for AMD 20.7.2 drivers
Vega 64 + Windows 10 + AMD 20.7.2 drivers were broken on Cryptonight algorithms.
2020-09-19 23:12:05 +02:00
SChernykh 1e38eb3f4f RandomX refactoring, moved more stuff to compile time
Small x86 JIT compiler speedup.
2020-09-18 20:51:25 +02:00
SChernykh 3ef7c9b5e6 RandomX: returned old soft AES impl and auto-select between the two 2020-09-15 20:48:27 +02:00
SChernykh f126fa112e RandomX: added performance profiler (for developers)
Also optimized Blake2b SSE4.1 code size to avoid code cache pollution.
2020-09-12 23:07:52 +02:00
SChernykh 9a53285c5f RandomX: added SSE4.1-optimized Blake2b
+0.15% on `rx/0`
+0.3% on `rx/wow`
2020-09-10 14:28:40 +02:00
SChernykh f26d4274fc RandomX: added parameter for scratchpad prefetch mode
`scratchpad_prefetch_mode` can have 4 values:
0: off
1: use `prefetcht0` instruction (default, same as previous XMRig versions)
2: use `prefetchnta` instruction (faster on Coffee Lake and a few other CPUs)
3: use `mov` instruction
2020-09-04 16:16:07 +02:00
SChernykh 1dca648537 Fixed self-select login sequence
In self-select mode, we only have pool wallet right after login.
2020-08-25 16:17:48 +02:00
SChernykh 07d9abc90e RandomX JIT: optimized address mask calculation 2020-08-12 16:45:16 +02:00
SChernykh 3d78f30171 Try to allocate scratchpad from dataset's 1 GB huge pages, if normal huge pages are not available 2020-07-31 13:37:22 +02:00
SChernykh 5aae95eddc Force 2 MB pages size in allocateLargePagesMemory() on Linux 2020-07-31 09:55:49 +02:00
SChernykh 3c383c59dc Fixed crash in RelWithDbgInfo MSVC build
Same problem as in https://github.com/xmrig/xmrig/pull/1784 , fixed with compiler flags this time.
2020-07-29 10:39:58 +02:00
SChernykh 8c8a46acb8 Added mining on battery setting 2020-07-22 20:21:42 +02:00
SChernykh 51370682f3 Fixed RandomX initialization for VS debug builds 2020-07-21 10:10:07 +02:00
SChernykh 3180e242a9 Cryptonight OpenCL: fix for long input data 2020-07-16 10:39:32 +02:00
SChernykh e8dbb8ca9f Removed cache QoS warning at exit on unsupported CPUs 2020-07-13 20:43:49 +02:00
SChernykh a3f4d91ad7 Cache QoS: fix for seting MSR 2020-07-13 20:30:44 +02:00
SChernykh 5af50b854c RandomX: added cache QoS support
False by default. If set to true, all non-mining CPU cores will not have access to L3 cache.
2020-07-13 17:23:18 +02:00
SChernykh 08d71d5144 RandomX: tweaked Ryzen code
Very small speedup
2020-07-05 16:06:59 +02:00
SChernykh bb87e9008c KawPow: fixed more duplicate share errors 2020-07-03 21:33:44 +02:00
SChernykh 119a065424 Fix typo 2020-07-02 14:29:52 +02:00
SChernykh d2d8fd48b9 KawPow: fixed rare duplicate share errors 2020-07-02 11:36:31 +02:00
SChernykh aa48c64a05 Fixed DAG initialization on slower AMD GPUs
Display driver could reset on GPUs with screen connected.
2020-06-30 16:53:56 +02:00