What: Update the interface to the atomic lifo to include non-atomic and opal_using_threads conditioned atomic versions.
Why: We currently only have one type of lifo in the master branch: atomic. This has a negative impact on the performance of Open MPI when not using threads. To fix this issue I want to add two new flavors of lifo push and pop: - opal_lifo_push_st/opal_lifo_pop_st: explicit single-threaded. These versions can be used when it is guaranteed that no other thread will touch the fifo. - opal_lifo_push/opal_lifo_pop: use atomics if opal_using_threads is set otherwise use the single-threaded versions. The existing functions: opal_atomic_lifo_push and opal_atomic_lifo_pop will be renamed to opal_lifo_push_atomic and opal_lifo_pop_atomic respectively. I have made some improvements to the atomic implementation and included implementations of push/pop that use the 128-bit compare-and-swap available on most modern x86_64 processors. Existing code (ompi_free_list_t) will use the conditioned version. This will give good out of the box performance with single threaded benchmarks while still providing support for the MPI_THREAD_MULTIPLE case. As part of this RFC I am pushing a fifo implementation and unit tests for both the fifo and lifo classes. More info can be found in the commit message: https://github.com/hjelmn/ompi/commit/b57b4b2df841a2d309b528717b40d9bf23355a82 When: Tuesday, Dec 9. The pull request can be found @ https://github.com/open-mpi/ompi/pull/300 -Nathan
pgpT17RQF9weU.pgp
Description: PGP signature