diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2016-11-21 18:49:41 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2016-11-21 18:49:41 +0000 |
commit | aa6fbaf751f980a3aa44c18d8b044bda6d99cbda (patch) | |
tree | dcff741a93f7fcfe0bade5e47f31287609af55e2 | |
parent | 43fb3dac59914deee8bf7a79f25f07c388b141fb (diff) | |
download | llvm-aa6fbaf751f980a3aa44c18d8b044bda6d99cbda.zip llvm-aa6fbaf751f980a3aa44c18d8b044bda6d99cbda.tar.gz llvm-aa6fbaf751f980a3aa44c18d8b044bda6d99cbda.tar.bz2 |
Merging r285703:
------------------------------------------------------------------------
r285703 | achurbanov | 2016-11-01 11:19:04 -0500 (Tue, 01 Nov 2016) | 9 lines
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: 287561
-rw-r--r-- | openmp/runtime/src/kmp_tasking.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openmp/runtime/src/kmp_tasking.c b/openmp/runtime/src/kmp_tasking.c index 9a64045..8875809 100644 --- a/openmp/runtime/src/kmp_tasking.c +++ b/openmp/runtime/src/kmp_tasking.c @@ -1788,8 +1788,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", |