[Openmp-commits] [PATCH] D28377: Fix a race in shutdown when tasking is used
Terry Wilmarth via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 5 13:22:17 PST 2017
tlwilmar created this revision.
tlwilmar added reviewers: Hahnfeld, AndreyChurbanov, hbae.
tlwilmar added a subscriber: openmp-commits.
tlwilmar set the repository for this revision to rL LLVM.
Jonas Hahnfeld reported a bug in shutdown in the presence of tasking.
This change fixes a race in shutdown code when threads are being reaped. Threads spinning in fork barrier and searching for tasks to steal may identify other threads as potential victims to steal from. The other threads may have already been reaped.
The fix creates a simple flag on the threads that lets them indicate that they are in a reapable state when shutdown is happening. The shutdown code then forces any threads out of the fork barrier and then waits until all the threads are reapable, before reaping any of them.
Repository:
rL LLVM
https://reviews.llvm.org/D28377
Files:
runtime/src/kmp.h
runtime/src/kmp_runtime.cpp
runtime/src/kmp_tasking.cpp
runtime/src/kmp_wait_release.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28377.83290.patch
Type: text/x-patch
Size: 4778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170105/ca27be19/attachment.bin>
More information about the Openmp-commits
mailing list