Browse Source

fix triggering criteria for the hyp

Andra Hugo 12 years ago
parent
commit
bda88614ed
1 changed files with 10 additions and 2 deletions
  1. 10 2
      sc_hypervisor/src/policies_utils/policy_tools.c

+ 10 - 2
sc_hypervisor/src/policies_utils/policy_tools.c

@@ -632,8 +632,16 @@ static unsigned _check_idle(unsigned sched_ctx, int worker)
 {
 	struct sc_hypervisor_wrapper* sc_w = sc_hypervisor_get_wrapper(sched_ctx);
 	struct sc_hypervisor_policy_config *config = sc_w->config;
-	if(config != NULL &&  sc_w->current_idle_time[worker] > config->max_idle[worker])
-		return 1;
+	if(config != NULL)
+	{
+		int j;
+		for(j = 0; j < STARPU_NMAXWORKERS; j++)
+		{
+			if(sc_w->current_idle_time[j] > config->max_idle[j])
+				return 1;
+		}
+	}
+
 	return 0;
 }