The FIFO implementation doesn't look right to me. I don't have time to look at it right now, but just looking at the push it will not correctly succeed if two threads are pushing items in same time.
A FIFO is a very sensitive algorithm, and should be treated accordingly. Moreover, there is no immediate need for it, so I suggest you drop it from this RFC. George. PS: There are some known FIFO implementations that work correctly, but they all require a CAS2. http://www.grame.fr/ressources/publications/LockFree.pdf On Tue, Dec 2, 2014 at 5:41 PM, Nathan Hjelm <hje...@lanl.gov> wrote: > > 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 > > _______________________________________________ > devel mailing list > de...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel > Link to this post: > http://www.open-mpi.org/community/lists/devel/2014/12/16410.php >