mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
Use a non-locking initial test in TAS_SPIN on PPC.
Further testing convinces me that this is helpful at sufficiently high contention levels, though it's still worrisome that it loses slightly at lower contention levels. Per Manabu Ori.
This commit is contained in:
parent
63876d3bac
commit
bc2a050d40
@ -358,6 +358,9 @@ typedef unsigned int slock_t;
|
|||||||
|
|
||||||
#define TAS(lock) tas(lock)
|
#define TAS(lock) tas(lock)
|
||||||
|
|
||||||
|
/* On PPC, it's a win to use a non-locking test before the lwarx */
|
||||||
|
#define TAS_SPIN(lock) (*(lock) ? 1 : TAS(lock))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002,
|
* NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002,
|
||||||
* an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.
|
* an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user