Forráskód Böngészése

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 éve
szülő
commit
97b650bef6
1 módosított fájl, 2 hozzáadás és 0 törlés
  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: