[Openmp-commits] [PATCH] Initial Dynamic Lock Dispatch Code in OpenMP

Jonathan Peyton jonathan.l.peyton at intel.com
Fri Feb 13 15:43:30 PST 2015


There are a lot of changes in this one.

Changes based off paper: “A User-Guided Locking API for the OpenMP* Application Program Interface”
This change is rather large, but currently is disabled.  One can turn it on by changing the value of KMP_USE_DYNAMIC_LOCK in kmp_os.h to 1
Abstract.
Although the OpenMP API specification defines a set of run-time routines for simple and nested locks, there is no standardized way to select different lock implementations. Programmers have to use vendor extensions to globally alter the lock implementation for the application; fine-grained control is not possible. Proper use of hardware-based speculative locks can achieve significant runtime improvements but, if used inappropriately, they can lead to severe performance penalties. Thus programmers need to be able to explicitly choose the right lock implementation on a per-lock basis. In this paper, we extend the OpenMP API for locks with functions to provide such hints to the implementation. We also extend the syntax and semantics of the critical construct with clauses to contain hints. Our performance results for micro-benchmarks show that the runtime selection of lock implementations does not add any noticeable overhead. We also show that using an appropriate runtime hint can improve application performance.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7631

Files:
  runtime/src/include/40/omp.h.var
  runtime/src/include/40/omp_lib.f.var
  runtime/src/include/40/omp_lib.f90.var
  runtime/src/include/40/omp_lib.h.var
  runtime/src/kmp_csupport.c
  runtime/src/kmp_dispatch.cpp
  runtime/src/kmp_error.c
  runtime/src/kmp_error.h
  runtime/src/kmp_ftn_entry.h
  runtime/src/kmp_ftn_os.h
  runtime/src/kmp_itt.h
  runtime/src/kmp_itt.inl
  runtime/src/kmp_lock.cpp
  runtime/src/kmp_lock.h
  runtime/src/kmp_omp.h
  runtime/src/kmp_os.h
  runtime/src/kmp_runtime.c
  runtime/src/kmp_settings.c
  runtime/src/kmp_taskq.c
  runtime/src/z_Linux_util.c

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7631.19942.patch
Type: text/x-patch
Size: 92751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20150213/016fc8aa/attachment.bin>


More information about the Openmp-commits mailing list