[Openmp-commits] [PATCH] D26182: Fixed problem introduced by part of https://reviews.llvm.org/D21196.

Andrey Churbanov via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 1 05:08:00 PDT 2016


AndreyChurbanov created this revision.
AndreyChurbanov added reviewers: jlpeyton, pawosm01.
AndreyChurbanov added a subscriber: openmp-commits.
AndreyChurbanov set the repository for this revision to rL LLVM.

One of changes made by https://reviews.llvm.org/D21196 caused error because of broken Task Scheduling Constraint (TSC) when stolen non-descendant untied task produced tied tasks those cannot be scheduled by the thread according to TSC.  This change fixes the problem by restoring TSC check for untied tasks during stealing.


Repository:
  rL LLVM

https://reviews.llvm.org/D26182

Files:
  runtime/src/kmp_tasking.c


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26182.76540.patch
Type: text/x-patch
Size: 930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20161101/1c5cd9a3/attachment.bin>


More information about the Openmp-commits mailing list