Commit 05adbbf1e953891d2e5b5ac61b5e74f8a1c7e7ed

Con Kolivas 2013-06-19T09:42:32

Only increase sleep time on bflsc if the queue isn't emptying at all over the sleep duration.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-bflsc.c b/driver-bflsc.c
index 001cb6a..aea5074 100644
--- a/driver-bflsc.c
+++ b/driver-bflsc.c
@@ -1851,7 +1851,7 @@ static int64_t bflsc_scanwork(struct thr_info *thr)
 		new_sleep_time = old_sleep_time;
 
 		/* Increase slowly but decrease quickly */
-		if (min_queued > sc_info->que_watermark && old_sleep_time < BFLSC_MAX_SLEEP)
+		if (min_queued > sc_info->que_full_enough && old_sleep_time < BFLSC_MAX_SLEEP)
 			new_sleep_time = old_sleep_time * 21 / 20;
 		else if (min_queued < sc_info->que_watermark)
 			new_sleep_time = old_sleep_time * 2 / 3;