[Openmp-commits] [PATCH] D39613: Exclude untied tasks from checking of task scheduling constraint (TSC)

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 7 11:22:37 PST 2017


AndreyChurbanov added inline comments.


================
Comment at: runtime/src/kmp_global.cpp:318
+int __kmp_task_stealing_constraint = 1; /* Constrain task stealing by default */
+volatile int __kmp_task_untied_encountered = 0;
 
----------------
Hahnfeld wrote:
> Does this need to be global variable? If I understand the current patch correctly, `__kmp_task_untied_encountered` will be set to true once the first untied task has been encountered, However, it is never reset to zero, potentially degrading performance for later parallel regions in a program that only use tied tasks, right?
> 
> Wouldn't it make sense to have this as a property of the current parallel region? (maybe in `kmp_taskteam_t`?) Or does this cause problems because of the current implementation of barriers where the teams may not be valid anymore for the workers that are in the fork barrier?
Thanks for the comment, I will think of making the flag local for a task team.  The task team is valid while threads execute tasks, it is the regular team that cannot be accessed safely by worker threads on fork barrier, so this is not a problem.



Repository:
  rL LLVM

https://reviews.llvm.org/D39613





More information about the Openmp-commits mailing list