[Openmp-commits] [PATCH] D106572: [OpenMP] Refined the logic to give a regular task from a hidden helper task

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 22 13:26:58 PDT 2021


AndreyChurbanov added a comment.

LGTM

(Though I didn't test it. Hope it won't break testing.)



================
Comment at: openmp/runtime/src/kmp_taskdeps.h:150
+                successor->dn.task,
+                __kmp_tid_from_gtid(next_taskdata->encountering_gtid));
           } else {
----------------
tianshilei1992 wrote:
> I found an interesting thing. If the encountering tid is not passed as a start point, the start point will be 0. In this case, it can happen that thread 0 tries to steal from thread 1, meanwhile thread 1 tries to steal from thread 0. Dead lock. @AndreyChurbanov Is it expected?
Stealing from different queues cannot deadlock because each queue uses its own lock while stealing from it or putting a task into it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106572/new/

https://reviews.llvm.org/D106572



More information about the Openmp-commits mailing list