Browse Source

Merge commit 'c91148f' into bfgminer

Conflicts:
	miner.c
Luke Dashjr 13 years ago
parent
commit
1e75ae47bf
2 changed files with 3 additions and 17 deletions
  1. 3 16
      miner.c
  2. 0 1
      miner.h

+ 3 - 16
miner.c

@@ -4906,7 +4906,6 @@ static void age_work(void)
 #define WATCHDOG_DEAD_TIME		600
 #define WATCHDOG_SICK_COUNT		(WATCHDOG_SICK_TIME/WATCHDOG_INTERVAL)
 #define WATCHDOG_DEAD_COUNT		(WATCHDOG_DEAD_TIME/WATCHDOG_INTERVAL)
-#define WATCHDOG_LOW_HASH		1.0 /* consider < 1MH too low for any device */
 
 static void *watchdog_thread(void __maybe_unused *userdata)
 {
@@ -4987,9 +4986,6 @@ static void *watchdog_thread(void __maybe_unused *userdata)
 			struct cgpu_info *cgpu = devices[i];
 			struct thr_info *thr = cgpu->thr[0];
 			enum dev_enable *denable;
-			bool dev_count_well;
-			bool dev_count_sick;
-			bool dev_count_dead;
 			char dev_str[8];
 			int gpu;
 
@@ -5039,21 +5035,12 @@ static void *watchdog_thread(void __maybe_unused *userdata)
 			if (!strcmp(cgpu->api->dname, "cpu"))
 				continue;
 #endif
-			if (max(WATCHDOG_LOW_HASH, cgpu->rolling) < cgpu->total_mhashes / total_secs / 3)
-				cgpu->low_count++;
-			else
-				cgpu->low_count = 0;
-
-			dev_count_well = (cgpu->low_count < WATCHDOG_SICK_COUNT);
-			dev_count_sick = (cgpu->low_count > WATCHDOG_SICK_COUNT);
-			dev_count_dead = (cgpu->low_count > WATCHDOG_DEAD_COUNT);
-
-			if (cgpu->status != LIFE_WELL && (now.tv_sec - thr->last.tv_sec < WATCHDOG_SICK_TIME) && dev_count_well) {
+			if (cgpu->status != LIFE_WELL && (now.tv_sec - thr->last.tv_sec < WATCHDOG_SICK_TIME)) {
 				if (cgpu->status != LIFE_INIT)
 				applog(LOG_ERR, "%s: Recovered, declaring WELL!", dev_str);
 				cgpu->status = LIFE_WELL;
 				cgpu->device_last_well = time(NULL);
-			} else if (cgpu->status == LIFE_WELL && ((now.tv_sec - thr->last.tv_sec > WATCHDOG_SICK_TIME) || dev_count_sick)) {
+			} else if (cgpu->status == LIFE_WELL && (now.tv_sec - thr->last.tv_sec > WATCHDOG_SICK_TIME)) {
 				thr->rolling = cgpu->rolling = 0;
 				cgpu->status = LIFE_SICK;
 				applog(LOG_ERR, "%s: Idle for more than 60 seconds, declaring SICK!", dev_str);
@@ -5072,7 +5059,7 @@ static void *watchdog_thread(void __maybe_unused *userdata)
 					applog(LOG_ERR, "%s: Attempting to restart", dev_str);
 					reinit_device(cgpu);
 				}
-			} else if (cgpu->status == LIFE_SICK && ((now.tv_sec - thr->last.tv_sec > WATCHDOG_DEAD_TIME) || dev_count_dead)) {
+			} else if (cgpu->status == LIFE_SICK && (now.tv_sec - thr->last.tv_sec > WATCHDOG_DEAD_TIME)) {
 				cgpu->status = LIFE_DEAD;
 				applog(LOG_ERR, "%s: Not responded for more than 10 minutes, declaring DEAD!", dev_str);
 				gettimeofday(&thr->sick, NULL);

+ 0 - 1
miner.h

@@ -345,7 +345,6 @@ struct cgpu_info {
 	double accepted_weighed;
 	int rejected;
 	int hw_errors;
-	unsigned int low_count;
 	double rolling;
 	double total_mhashes;
 	double utility;