[Openmp-commits] [PATCH] D49452: Block library shutdown until unreaped threads finish spin-waiting
Hansang Bae via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 17 13:49:13 PDT 2018
hbae created this revision.
hbae added reviewers: AndreyChurbanov, tlwilmar, jlpeyton.
hbae added a project: OpenMP.
This change fixes possibly invalid access to the internal data structure during library shutdown.
In a heavily oversubscribed situation, the library shutdown sequence can reach the point
where resources are deallocated while there still exist threads in their final spinning loop.
The added loop in __kmp_internal_end() checks if there are such busy-waiting threads and
blocks the shutdown sequence if that is the case. Two versions of kmp_wait_template() are
now used to minimize performance impact.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D49452
Files:
runtime/src/kmp.h
runtime/src/kmp_runtime.cpp
runtime/src/kmp_wait_release.cpp
runtime/src/kmp_wait_release.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49452.155961.patch
Type: text/x-patch
Size: 5878 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180717/bccc38ec/attachment.bin>
More information about the Openmp-commits
mailing list