mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
Implement new 'lightweight lock manager' that's intermediate between
existing lock manager and spinlocks: it understands exclusive vs shared lock but has few other fancy features. Replace most uses of spinlocks with lightweight locks. All remaining uses of spinlocks have very short lock hold times (a few dozen instructions), so tweak spinlock backoff code to work efficiently given this assumption. All per my proposal on pghackers 26-Sep-01.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: smgr.h,v 1.30 2001/06/27 23:31:39 tgl Exp $
|
||||
* $Id: smgr.h,v 1.31 2001/09/29 04:02:27 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -17,9 +17,9 @@
|
||||
#include "access/xlog.h"
|
||||
#include "storage/relfilenode.h"
|
||||
#include "storage/block.h"
|
||||
#include "storage/spin.h"
|
||||
#include "utils/rel.h"
|
||||
|
||||
|
||||
#define SM_FAIL 0
|
||||
#define SM_SUCCESS 1
|
||||
|
||||
@@ -79,8 +79,6 @@ extern int mdabort(void);
|
||||
extern int mdsync(void);
|
||||
|
||||
/* mm.c */
|
||||
extern SPINLOCK MMCacheLock;
|
||||
|
||||
extern int mminit(void);
|
||||
extern int mmcreate(Relation reln);
|
||||
extern int mmunlink(RelFileNode rnode);
|
||||
|
||||
Reference in New Issue
Block a user