Commit bc2976f53874818b16735f2e0d0468503238fb54

Con Kolivas 2011-07-30T21:56:51

Be more willing to get work from the backup pools if the work is simply being queued faster than it is being retrieved.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/main.c b/main.c
index 18c9fd7..23dfbb6 100644
--- a/main.c
+++ b/main.c
@@ -2319,10 +2319,10 @@ static bool queue_request(struct thr_info *thr)
 	else
 		wc->thr = NULL;
 
-	/* If we've queued more than 2/3 of the maximum and still have no
-	 * staged work, consider the system lagging and allow work to be
-	 * gathered from another pool if possible */
-	if (rq > (maxq * 2 / 3) && !rs)
+	/* If we're queueing work faster than we can stage it, consider the
+	 * system lagging and allow work to be gathered from another pool if
+	 * possible */
+	if (rq > rs)
 		wc->lagging = true;
 
 	if (opt_debug)