Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6308: Add sp_counted_base_aix.hpp using AIX atomic operations
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-23 13:18:36
#6308: Add sp_counted_base_aix.hpp using AIX atomic operations
-----------------------------------------+----------------------------------
Reporter: aaron.riekenberg@⦠| Owner: pdimov
Type: Feature Requests | Status: reopened
Milestone: To Be Determined | Component: smart_ptr
Version: Boost 1.48.0 | Severity: Optimization
Resolution: | Keywords:
-----------------------------------------+----------------------------------
Comment (by aaron.riekenberg@â¦):
AIX only runs on POWER and PowerPC.
fetch_and_add is not documented to do any memory barrier. I looked at the
instructions for fetch_and_add with listi in dbx. It does lwarx and stwcx
but does not do lwsync, sync, or isync. So I believe it does not contain
a barrier.
I am attaching a new version of sp_counted_base_aix.hpp
(sp_counted_base_aix_122311.hpp). This version is written more in the
style of sp_counted_base_gcc_ppc.hpp. I added a leading sync instruction
to atomic_decrement and a trailing isync for a full barrier.
The performance of this version is a bit worse than my original no-barrier
version. Each iteration of the test program now takes about 8.8
microseconds. This is still 2.5X faster than using pthread_mutex.
Thanks for your patience in getting this correct.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6308#comment:5> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC