mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 13:04:29 +00:00
Go back to requesting work 2/3 of the way through the current scantime with CPU mining as reports of mining threads running out of work have occurred with only 5 seconds to retrieve work.
This commit is contained in:
parent
a593afdbeb
commit
5aca762a97
9
main.c
9
main.c
@ -3303,20 +3303,13 @@ static void *miner_thread(void *userdata)
|
||||
bool needs_work = true;
|
||||
/* Try to cycle approximately 5 times before each log update */
|
||||
const unsigned long cycle = opt_log_interval / 5 ? : 1;
|
||||
int request_interval;
|
||||
unsigned const int request_interval = opt_scantime * 2 / 3 ? : 1;
|
||||
bool requested = false;
|
||||
uint32_t nonce_inc = max_nonce, hash_div = 1;
|
||||
double hash_divfloat = 1.0;
|
||||
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
||||
/* Request the next work item just before the end of the scantime. We
|
||||
* don't want the work lying around too long since the CPU will always
|
||||
* spend the full scantime */
|
||||
request_interval = opt_scantime - 5;
|
||||
if (request_interval < 1)
|
||||
request_interval = 1;
|
||||
|
||||
/* Set worker threads to nice 19 and then preferentially to SCHED_IDLE
|
||||
* and if that fails, then SCHED_BATCH. No need for this to be an
|
||||
* error if it fails */
|
||||
|
Loading…
x
Reference in New Issue
Block a user