diff options
author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2016-06-13 17:51:59 +0000 |
---|---|---|
committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2016-06-13 17:51:59 +0000 |
commit | 8cb45c838f99fd1cbc38bdc5bd272f6d090ce147 (patch) | |
tree | 0a3e1d9f0f54eccf726c3b95751f59cebe2a700d /openmp | |
parent | fb2342d27474ea9f5246969a106d1f0525352433 (diff) | |
download | bcm5719-llvm-8cb45c838f99fd1cbc38bdc5bd272f6d090ce147.tar.gz bcm5719-llvm-8cb45c838f99fd1cbc38bdc5bd272f6d090ce147.zip |
Exclude untied tasks from task stealing constraint
If either current_task or new_task is untied then skip task scheduling
constraint checks, because untied tasks are not affected by the task
scheduling constraints.
Differential Revision: http://reviews.llvm.org/D21196
llvm-svn: 272570
Diffstat (limited to 'openmp')
-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 1071b716aea..4058dbf59cf 100644 --- a/openmp/runtime/src/kmp_tasking.c +++ b/openmp/runtime/src/kmp_tasking.c @@ -1644,7 +1644,7 @@ __kmp_remove_my_task( kmp_info_t * thread, kmp_int32 gtid, kmp_task_team_t *task tail = ( thread_data -> td.td_deque_tail - 1 ) & TASK_DEQUE_MASK(thread_data->td); // Wrap index. taskdata = thread_data -> td.td_deque[ tail ]; - if (is_constrained) { + if (is_constrained && (taskdata->td_flags.tiedness == TASK_TIED)) { // we need to check if the candidate obeys task scheduling constraint: // only child of current task can be scheduled kmp_taskdata_t * current = thread->th.th_current_task; @@ -1751,7 +1751,7 @@ __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 ) { + 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 (?). __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 " |