postgresql/src/backend/storage
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
..
buffer Improve hash_create's API for selecting simple-binary-key hash functions. 2014-12-18 13:36:36 -05:00
file Sync unlogged relations to disk after they have been reset. 2014-11-15 01:19:31 +01:00
freespace pgindent run for 9.4 2014-05-06 12:12:18 -04:00
ipc Keep track of transaction commit timestamps 2014-12-03 11:53:02 -03:00
large_object Add defenses against running with a wrong selection of LOBLKSIZE. 2014-06-05 11:31:06 -04:00
lmgr Improve LWLock scalability. 2014-12-25 17:24:30 +01:00
page BRIN: Block Range Indexes 2014-11-07 16:38:14 -03:00
smgr Improve hash_create's API for selecting simple-binary-key hash functions. 2014-12-18 13:36:36 -05:00
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00