llvm-project/openmp/runtime/test
Jonathan Peyton 377aa40d84 Exponential back off logic for test-and-set lock
This change adds back off logic in the test and set lock for better contended
lock performance. It uses a simple truncated binary exponential back off
function. The default back off parameters are tuned for x86.

The main back off logic has a two loop structure where each is controlled by a
user-level parameter:
max_backoff - limits the outer loop number of iterations.
    This parameter should be a power of 2.
min_ticks - the inner spin wait loop number of "ticks" which is system
    dependent and should be tuned for your system if you so choose.
    The "ticks" on x86 correspond to the time stamp counter,
    but on other architectures ticks is a timestamp derived
    from gettimeofday().

The user can modify these via the environment variable:
KMP_SPIN_BACKOFF_PARAMS=max_backoff[,min_ticks]
Currently, since the default user lock is a queuing lock,
one would have to also specify KMP_LOCK_KIND=tas to use the test-and-set locks.

Differential Revision: http://reviews.llvm.org/D19020

llvm-svn: 266329
2016-04-14 16:00:37 +00:00
..
api [OPENMP] Fixed tests for gcc build. 2015-11-16 11:35:57 +00:00
atomic
barrier omp_barrier.c test fixed in order to reliably and faster run on any number of processors 2016-01-25 16:52:10 +00:00
critical
env OMP_WAIT_POLICY changes 2016-04-04 19:38:32 +00:00
flush
lock Exponential back off logic for test-and-set lock 2016-04-14 16:00:37 +00:00
master
ompt [OMPT] Fix parallel_id and task_id in loop_end with schedule static 2016-03-24 12:52:20 +00:00
parallel
tasking Add new OpenMP 4.5 taskloop construct feature 2016-03-02 22:47:51 +00:00
threadprivate test omp_threadprivate_for.c fixed 2015-12-27 18:14:40 +00:00
worksharing Forgot to add test files for doacross and task priority. 2016-03-02 22:43:14 +00:00
CMakeLists.txt [OMPT] Make tests require OMPT_BLAME 2016-03-22 08:23:24 +00:00
lit.cfg [OMPT] Fix parallel_id and task_id in loop_end with schedule static 2016-03-24 12:52:20 +00:00
lit.site.cfg.in [OMPT] Make tests require OMPT_BLAME 2016-03-22 08:23:24 +00:00
omp_my_sleep.h
omp_testsuite.h [OPENMP] Add dependency to clang/clang-headers etc. for in-tree build of libomp. 2015-11-02 13:43:32 +00:00