postgresql/src/include
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
..
access Move rbtree.c from src/backend/utils/misc to src/backend/lib. 2014-12-22 17:52:08 +02:00
bootstrap Fix off-by-one loop count in MapArrayTypeName, and get rid of static array. 2014-12-16 15:35:33 -05:00
catalog Revert "Use a bitmask to represent role attributes" 2014-12-23 15:35:49 -03:00
commands pg_event_trigger_dropped_objects: add behavior flags 2014-12-19 15:00:45 -03:00
common Move pg_lzcompress.c to src/common. 2014-12-25 20:46:14 +09:00
datatype pgindent run for 9.4 2014-05-06 12:12:18 -04:00
executor Rearrange CustomScan API. 2014-11-21 18:21:46 -05:00
foreign Implement IMPORT FOREIGN SCHEMA. 2014-07-10 15:01:43 -04:00
lib Move rbtree.c from src/backend/utils/misc to src/backend/lib. 2014-12-22 17:52:08 +02:00
libpq Make Port->ssl_in_use available, even when built with !USE_SSL 2014-11-25 09:46:11 +02:00
mb pgindent run for 9.4 2014-05-06 12:12:18 -04:00
nodes Remove unused fields from ReindexStmt. 2014-12-24 21:40:47 +09:00
optimizer Rearrange CustomScan API. 2014-11-21 18:21:46 -05:00
parser Add SQL-callable pg_get_object_address 2014-12-23 15:31:29 -03:00
port Add native compiler and memory barriers for solaris studio. 2014-10-25 11:11:39 +02:00
portability pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postmaster Add some noreturn attributes based on compiler recommendations 2014-08-13 22:40:48 -04:00
regex pgindent run for 9.4 2014-05-06 12:12:18 -04:00
replication Put the logic to decide which synchronous standby is active into a function. 2014-12-12 14:26:42 +02:00
rewrite Rename pg_rowsecurity -> pg_policy and other fixes 2014-11-27 01:15:57 -05:00
snowball pgindent run for 9.4 2014-05-06 12:12:18 -04:00
storage Improve LWLock scalability. 2014-12-25 17:24:30 +01:00
tcop pgindent run for 9.4 2014-05-06 12:12:18 -04:00
tsearch Allow opclasses to provide tri-valued GIN consistent functions. 2014-03-12 17:51:30 +02:00
utils Add capability to suppress CONTEXT: messages to elog machinery. 2014-12-25 17:24:30 +01:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Define Assert() et al to ((void)0) to avoid pedantic warnings. 2014-12-19 14:27:45 +01:00
fmgr.h Add PG_RETURN_UINT16 macro. 2014-08-06 16:11:43 -04:00
funcapi.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
getaddrinfo.h Fix assorted issues in client host name lookup. 2014-04-02 17:11:24 -04:00
getopt_long.h Add support for optional_argument to our own getopt_long() implementation. 2014-09-10 17:21:50 +02:00
Makefile Install all headers for the new atomics API. 2014-10-02 16:52:21 +02:00
miscadmin.h Add a function to get the authenticated user ID. 2014-10-23 08:18:45 -04:00
pg_config.h.in Detect PG_PRINTF_ATTRIBUTE automatically. 2014-11-23 09:34:03 -05:00
pg_config.h.win32 Add a basic atomic ops API abstracting away platform/architecture details. 2014-09-25 23:49:05 +02:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Move PG_AUTOCONF_FILENAME definition 2014-12-03 19:54:01 -05:00
pg_getopt.h Fix comment. 2014-05-08 12:42:56 -04:00
pg_trace.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgstat.h Add memory barriers for PgBackendStatus.st_changecount protocol. 2014-12-18 23:07:51 +09:00
pgtar.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgtime.h Support timezone abbreviations that sometimes change. 2014-10-16 15:22:10 -04:00
port.h Windows: use GetSystemTimePreciseAsFileTime if available 2014-12-08 23:36:06 +09:00
postgres.h Fix typos in comments. 2014-07-07 19:39:42 +09:00
postgres_ext.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postgres_fe.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
rusagestub.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
windowapi.h Update copyright for 2014 2014-01-07 16:05:30 -05:00