[Openmp-commits] [PATCH] Initial Dynamic Lock Dispatch Code in OpenMP
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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 92751 bytes
Desc: not available
More information about the Openmp-commits