This is an archive of the discontinued LLVM Phabricator instance.

Avoid deadlock with COI
ClosedPublic

Authored by jlpeyton on May 27 2016, 8:48 AM.

Details

Summary

When an asynchronous offload task is completed, COI calls the runtime to queue a "destructor tasks". When the task deques are full, a dead-lock situation arises where the OpenMP threads are inside but cannot progress because the COI thread is stuck inside the runtime trying to find a slot in a deque.

This patch implements the solution where the task deques doubled in size when a task is being queued from a COI thread.

Diff Detail

Repository
rL LLVM

Event Timeline

jlpeyton updated this revision to Diff 58785.May 27 2016, 8:48 AM
jlpeyton retitled this revision from to Avoid deadlock with COI.
jlpeyton updated this object.
jlpeyton added reviewers: AndreyChurbanov, tlwilmar.
jlpeyton set the repository for this revision to rL LLVM.
jlpeyton added a subscriber: openmp-commits.
tlwilmar accepted this revision.May 31 2016, 10:52 AM
tlwilmar edited edge metadata.

LGTM

This revision is now accepted and ready to land.May 31 2016, 10:52 AM
This revision was automatically updated to reflect the committed changes.