postgresql/src
Andres Freund ab5194e6f6 Improve LWLock scalability.
The old LWLock implementation had the problem that concurrent lock
acquisitions required exclusively acquiring a spinlock. Often that
could lead to acquirers waiting behind the spinlock, even if the
actual LWLock was free.

The new implementation doesn't acquire the spinlock when acquiring the
lock itself. Instead the new atomic operations are used to atomically
manipulate the state. Only the waitqueue, used solely in the slow
path, is still protected by the spinlock. Check lwlock.c's header for
an explanation about the used algorithm.

For some common workloads on larger machines this can yield
significant performance improvements. Particularly in read mostly
workloads.

Reviewed-By: Amit Kapila and Robert Haas
Author: Andres Freund

Discussion: 20130926225545.GB26663@awork2.anarazel.de
2014-12-25 17:24:30 +01:00
..
backend Improve LWLock scalability. 2014-12-25 17:24:30 +01:00
bin Revert "Use a bitmask to represent role attributes" 2014-12-23 15:35:49 -03:00
common Move pg_lzcompress.c to src/common. 2014-12-25 20:46:14 +09:00
include Improve LWLock scalability. 2014-12-25 17:24:30 +01:00
interfaces Translation updates 2014-12-15 00:25:35 -05:00
makefiles Revert haphazard pgxs makefile changes 2014-12-04 08:07:59 -05:00
pl Improve hash_create's API for selecting simple-binary-key hash functions. 2014-12-18 13:36:36 -05:00
port Windows: use GetSystemTimePreciseAsFileTime if available 2014-12-08 23:36:06 +09:00
template Remove Alpha and Tru64 support. 2014-06-28 21:46:15 +02:00
test Remove failing collation case from object_address regression test. 2014-12-23 16:55:51 -05:00
timezone Add CST (China Standard Time) to our lists of timezone abbreviations. 2014-12-24 16:35:23 -05:00
tools Move pg_lzcompress.c to src/common. 2014-12-25 20:46:14 +09:00
tutorial Adjust blank lines around PG_MODULE_MAGIC defines, for consistency 2014-07-10 14:02:08 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Fix installcheck case for tap tests 2014-12-24 10:31:36 -05:00
Makefile.shlib Clarify .def file comments. 2014-11-02 21:43:33 -05:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00