mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-09 05:24:16 +00:00
Since we roll work all the time now, we end up staging a lot of work without queueing, so don't queue if we've already got staged work.
This commit is contained in:
parent
bf3033e0f1
commit
b81077f36a
4
main.c
4
main.c
@ -2915,6 +2915,9 @@ static bool queue_request(struct thr_info *thr, bool needed)
|
|||||||
if (rq >= maxq || rs >= maxq)
|
if (rq >= maxq || rs >= maxq)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if (rs > rq)
|
||||||
|
goto out;
|
||||||
|
|
||||||
/* fill out work request message */
|
/* fill out work request message */
|
||||||
wc = calloc(1, sizeof(*wc));
|
wc = calloc(1, sizeof(*wc));
|
||||||
if (unlikely(!wc)) {
|
if (unlikely(!wc)) {
|
||||||
@ -2943,6 +2946,7 @@ static bool queue_request(struct thr_info *thr, bool needed)
|
|||||||
workio_cmd_free(wc);
|
workio_cmd_free(wc);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
out:
|
||||||
inc_queued();
|
inc_queued();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user