Skip site navigation (1) Skip section navigation (2)

pgsql/src/backend/storage/lmgr lwlock.c

From: tgl(at)postgresql(dot)org
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql/src/backend/storage/lmgr lwlock.c
Date: 2002-01-07 16:33:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
CVSROOT:	/cvsroot
Module name:	pgsql
Changes by:	tgl(at)postgresql(dot)org	02/01/07 11:33:01

Modified files:
	src/backend/storage/lmgr: lwlock.c 

Log message:
	Tweak LWLock algorithms so that an awakened waiter for a lock is not
	granted the lock when awakened; the signal now only means that the lock
	is potentially available.  The waiting process must retry its attempt
	to get the lock when it gets to run.  This allows the lock releasing
	process to re-acquire the lock later in its timeslice.  Since LWLocks
	are usually held for short periods, it is possible for a process to
	acquire and release the same lock many times in a timeslice.  The old
	spinlock-based implementation of these locks allowed for that; but the
	original coding of LWLock would force a process swap for each acquisition
	if there was any contention.  Although this approach reopens the door to
	process starvation (a waiter might repeatedly fail to get the lock),
	the odds of that being a big problem seem low, and the performance cost
	of the previous approach is considerable.

pgsql-committers by date

Next:From: tglDate: 2002-01-07 18:56:14
Subject: pgsql/contrib/pgcrypto
Previous:From: meskesDate: 2002-01-07 16:25:50
Subject: pgsql/src/interfaces/ecpg ChangeLog preproc/pr ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group