浏览代码

Add missing relaxation

Samuel Thibault 8 年之前
父节点
当前提交
2c4fabcdc1
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/sched_policies/parallel_heft.c

+ 4 - 0
src/sched_policies/parallel_heft.c

@@ -130,7 +130,9 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 
 
 		/* We don't want it to interlace its task with a combined
 		/* We don't want it to interlace its task with a combined
 		 * worker's one */
 		 * worker's one */
+		_starpu_worker_relax_on();
 		STARPU_PTHREAD_MUTEX_LOCK(&hd->global_push_mutex);
 		STARPU_PTHREAD_MUTEX_LOCK(&hd->global_push_mutex);
+		_starpu_worker_relax_off();
 
 
 		ret = starpu_push_local_task(best_workerid, task, prio);
 		ret = starpu_push_local_task(best_workerid, task, prio);
 
 
@@ -150,7 +152,9 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 		starpu_combined_worker_get_description(best_workerid, &worker_size, &combined_workerid);
 		starpu_combined_worker_get_description(best_workerid, &worker_size, &combined_workerid);
 
 
 		/* All cpu workers must be locked at once */
 		/* All cpu workers must be locked at once */
+		_starpu_worker_relax_on();
 		STARPU_PTHREAD_MUTEX_LOCK(&hd->global_push_mutex);
 		STARPU_PTHREAD_MUTEX_LOCK(&hd->global_push_mutex);
+		_starpu_worker_relax_off();
 
 
 		/* This is a combined worker so we create task aliases */
 		/* This is a combined worker so we create task aliases */
 		int i;
 		int i;