Commit bd10764e769deef3a15d04bd3c4919e7cb045fc7

Con Kolivas 2012-07-14T11:07:15

Cope with when we cannot set intensity low enough to meet dynamic interval by inducing a forced sleep.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-opencl.c b/driver-opencl.c
index ffe2fda..c086959 100644
--- a/driver-opencl.c
+++ b/driver-opencl.c
@@ -1428,6 +1428,8 @@ static int64_t opencl_scanhash(struct thr_info *thr, struct work *work,
 			if (gpu->gpu_us_average > dynamic_us) {
 				if (gpu->intensity > MIN_INTENSITY)
 					--gpu->intensity;
+				else
+					nmsleep(opt_dynamic_interval / 2 ? : 1);
 			} else if (gpu->gpu_us_average < dynamic_us / 2) {
 				if (gpu->intensity < MAX_INTENSITY)
 					++gpu->intensity;