Browse Source

Bugfix: Reset staged_full flag when discarding (stale) popped work, or increasing the queue minimum

Luke Dashjr 12 years ago
parent
commit
804ca2262a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      miner.c

+ 2 - 0
miner.c

@@ -6969,6 +6969,7 @@ retry:
 			}
 			else
 				applog(LOG_WARNING, "Staged work underrun; not automatically increasing above %d", opt_queue);
+			staged_full = false;  // Let it fill up before triggering an underrun again
 		}
 		pthread_cond_wait(&getq->cond, stgd_lock);
 	}
@@ -7227,6 +7228,7 @@ struct work *get_work(struct thr_info *thr)
 	while (!work) {
 		work = hash_pop();
 		if (stale_work(work, false)) {
+			staged_full = false;  // It wasn't really full, since it was stale :(
 			discard_work(work);
 			work = NULL;
 			wake_gws();