[Openmp-commits] [PATCH] D18577: OMP_WAIT_POLICY changes.

Andrey Churbanov via Openmp-commits openmp-commits at lists.llvm.org
Wed Mar 30 03:29:15 PDT 2016


AndreyChurbanov added a comment.

> To clarify, is this a change in behavior for OMP_WAIT_POLICY=active, or just for OMP_WAIT_POLICY=passive?


Both actually.

A bit more details: earlier the OMP_WAIT_POLICY was attributed to the KMP_LIBRARY functionality, so the difference between active and passive behavior was the presence of "yield" calls for passive. Thus the majority of applications don't see any difference because of setting OMP_WAIT_POLICY.  The blocktime affects performance much stronger than yields, so we decided to make the OMP_WAIT_POLICY more sensitive and added the functionality of KMP_BLOCKTIME to it.

In summary:
Old:

  OMP_WAIT_POLICY-active
    threads spin for the default blocktime, no yields, then go to sleep.
  OMP_WAIT_POLICY=passive
    threads spin for the default blocktime calling yields, then go to sleep.

New:

  OMP_WAIT_POLICY-active
    threads spin forever, no yields.
  OMP_WAIT_POLICY=passive
    threads do not spin, go to sleep immediately.

Of cause additional setting of the KMP_BLOCKTIME will change the behavior.


Repository:
  rL LLVM

http://reviews.llvm.org/D18577





More information about the Openmp-commits mailing list