소스 검색

Do not keep the scheduling mutex while submitting conversion tasks, since that may be calling _starpu_post_data_request and thus _starpu_wake_all_blocked_workers_on_node in the end, leading to a deadlock.

Samuel Thibault 10 년 전
부모
커밋
97b650bef6
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/core/sched_policy.c

+ 2 - 0
src/core/sched_policy.c

@@ -830,6 +830,7 @@ pick:
 	 * We do have a task that uses multiformat handles. Let's create the
 	 * required conversion tasks.
 	 */
+	STARPU_PTHREAD_MUTEX_UNLOCK(&worker->sched_mutex);
 	unsigned i;
 	unsigned nbuffers = STARPU_TASK_GET_NBUFFERS(task);
 	for (i = 0; i < nbuffers; i++)
@@ -853,6 +854,7 @@ pick:
 
 	task->mf_skip = 1;
 	starpu_task_list_push_back(&worker->local_tasks, task);
+	STARPU_PTHREAD_MUTEX_LOCK(&worker->sched_mutex);
 	goto pick;
 
 profiling: