git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c5e5d44)
Replace ia64 S_UNLOCK compiler barrier with a full memory barrier.
2015年6月29日 12:53:32 +0000 (14:53 +0200)
2015年6月29日 12:53:32 +0000 (14:53 +0200)
_Asm_sched_fence() is just a compiler barrier, not a memory barrier. But
spinlock release on IA64 needs, at the very least, release
semantics. Use a full barrier instead.

This might be the cause for the occasional failures on buildfarm member
anole.

Discussion: 20150629101108.GB17640@alap3.anarazel.de


diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index c63cf54c8ebc4b85d9649ba2f2f5bad7821e08a6..30f28b088ab2d2985e8b3093002f666af6f9c296 100644 (file)
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -806,7 +806,7 @@ typedef unsigned int slock_t;
/* On IA64, it's a win to use a non-locking test before the xchg proper */
#define TAS_SPIN(lock) (*(lock) ? 1 : TAS(lock))
#define S_UNLOCK(lock) \
- do { _Asm_sched_fence(); (*(lock)) = 0; } while (0)
+ do { _Asm_mf(); (*(lock)) = 0; } while (0)
#endif /* HPUX on IA64, non gcc */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /