Re: better atomics - v0.6
Andres Freund <andres@2ndquadrant.com>
From: Andres Freund <andres@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Peter Geoghegan <pg@heroku.com>,
Pg Hackers <pgsql-hackers@postgresql.org>, Ants Aasma <ants@cybertec.at>
Date: 2014-09-22T21:01:07Z
Lists: pgsql-hackers
Attachments
- 0001-Add-a-basic-atomic-ops-API-abstracting-away-platform.patch (text/x-patch) patch 0001
- 0002-Add-implementation-of-spinlocks-using-the-atomics.h-.patch (text/x-patch) patch 0002
- 0003-XXX-Hack-ShmemAlloc-to-align-all-allocations-to-cach.patch (text/x-patch) patch 0003
- 0004-Convert-the-PGPROC-lwWaitLink-list-into-a-dlist-inst.patch (text/x-patch) patch 0004
- 0005-Wait-free-LW_SHARED-lwlock-acquiration.patch (text/x-patch) patch 0005
Hi,
I've finally managed to incorporate (all the?) feedback I got for
0.5. Imo the current version looks pretty good.
Most notable changes:
* Lots of comment improvements
* code moved out of storage/ into port/
* separated the s_lock.h changes into its own commit
* merged i386/amd64 into one file
* fixed lots of the little details Amit noticed
* fixed lots of XXX/FIXMEs
* rebased to today's master
* tested various gcc/msvc versions
* extended the regression tests
* ...
The patches:
0001: The actual atomics API
0002: Implement s_lock.h support ontop the atomics API. Existing
implementations continue to be used unless
FORCE_ATOMICS_BASED_SPINLOCKS is defined
0003-0005: Not proposed for review here. Just included because code
actually using the atomics make testing them easier.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Avoid the use of a separate spinlock to protect a LWLock's wait queue.
- 008608b9d510 9.6.0 cited
-
Improve LWLock scalability.
- ab5194e6f617 9.5.0 cited
-
Reduce the number of semaphores used under --disable-spinlocks.
- daa7527afc22 9.4.0 cited
-
Alter the configure script to fail immediately if the C compiler does not
- d15cb38dec01 9.0.0 cited