Browse Source

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

Con Kolivas 13 years ago
parent
commit
bd10764e76
1 changed files with 2 additions and 0 deletions
  1. 2 0
      driver-opencl.c

+ 2 - 0
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->gpu_us_average > dynamic_us) {
 				if (gpu->intensity > MIN_INTENSITY)
 				if (gpu->intensity > MIN_INTENSITY)
 					--gpu->intensity;
 					--gpu->intensity;
+				else
+					nmsleep(opt_dynamic_interval / 2 ? : 1);
 			} else if (gpu->gpu_us_average < dynamic_us / 2) {
 			} else if (gpu->gpu_us_average < dynamic_us / 2) {
 				if (gpu->intensity < MAX_INTENSITY)
 				if (gpu->intensity < MAX_INTENSITY)
 					++gpu->intensity;
 					++gpu->intensity;