[Openmp-commits] [PATCH] D21196: Excluded untied tasks from task stealing constraint

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 13 10:58:47 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL272570: Exclude untied tasks from task stealing constraint (authored by jlpeyton).

Changed prior to commit:
  http://reviews.llvm.org/D21196?vs=60228&id=60562#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D21196

Files:
  openmp/trunk/runtime/src/kmp_tasking.c

Index: openmp/trunk/runtime/src/kmp_tasking.c
===================================================================
--- openmp/trunk/runtime/src/kmp_tasking.c
+++ openmp/trunk/runtime/src/kmp_tasking.c
@@ -1644,7 +1644,7 @@
     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 @@
             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 "


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21196.60562.patch
Type: text/x-patch
Size: 1296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160613/5a1baac0/attachment.bin>


More information about the Openmp-commits mailing list