summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorAndrey Churbanov <Andrey.Churbanov@intel.com>2016-11-01 16:19:04 +0000
committerAndrey Churbanov <Andrey.Churbanov@intel.com>2016-11-01 16:19:04 +0000
commit51107e0abcf05477d3dd3bf97e217b18ed84b215 (patch)
tree8b819a03f6ece268063dc2564ed4476c8d8667ba /openmp/runtime/src
parent1408bf7231c22bce70fea5470a865955ee40399b (diff)
downloadbcm5719-llvm-51107e0abcf05477d3dd3bf97e217b18ed84b215.tar.gz
bcm5719-llvm-51107e0abcf05477d3dd3bf97e217b18ed84b215.zip
Fixed problem introduced by part of https://reviews.llvm.org/D21196.
Check Task Scheduling Constraint (TSC) on stealing of untied task. This is needed because the untied task can produce tied children those can break TSC if untied is not a descendant of current task. This can cause live lock on complex tyasking tests (e.g. kastors/strassen-task-dep). Differential Revision: https://reviews.llvm.org/D26182 llvm-svn: 285703
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp_tasking.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openmp/runtime/src/kmp_tasking.c b/openmp/runtime/src/kmp_tasking.c
index d3fcba85dfa..e0079177642 100644
--- a/openmp/runtime/src/kmp_tasking.c
+++ b/openmp/runtime/src/kmp_tasking.c
@@ -1801,8 +1801,8 @@ __kmp_steal_task( kmp_info_t *victim, kmp_int32 gtid, kmp_task_team_t *task_team
parent = parent->td_parent; // check generation up to the level of the current task
KMP_DEBUG_ASSERT(parent != NULL);
}
- if ( parent != current && (taskdata->td_flags.tiedness == TASK_TIED) ) { // untied is always allowed to be stolen
- // If the tail task is not a child, then no other childs can appear in the deque (?).
+ if ( parent != current ) {
+ // If the tail task is not a descendant of the current task then do not steal it.
__kmp_release_bootstrap_lock( & victim_td -> td.td_deque_lock );
KA_TRACE(10, ("__kmp_steal_task(exit #2): T#%d could not steal from T#%d: task_team=%p "
"ntasks=%d head=%u tail=%u\n",
OpenPOWER on IntegriCloud