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

AMD64 dual core mutex/spinlock problem

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: AMD64 dual core mutex/spinlock problem
Date: 2006-04-27 10:14:54
Message-ID: 1146132894.11219.57.camel@unknown (view raw or flat)
Thread:
Lists: pgsql-hackers
Some AMD64 dual core processor series has problem with atomic operation
"lock cmpxchg". It does not work correctly in some case. (I don't know
if it is bug or feature.) This problem occurred in the solaris on the
AMD64 platform. Postgres implement own lock mechanism with similar code
"lock xchg". I am not sure if this is wrong or not. My question is, If
someone has problem with spinlock on AMD64 dual core in 64-bit mode.


  - Zdenek

PS: You can see Solaris mutex_enter code on
http://cvs.opensolaris.org/source/xref/on/usr/src/uts/intel/ia32/ml/lock_prim.s 
Extra lfence instruction after atomic operation fix the problem.


pgsql-hackers by date

Next:From: Martijn van OosterhoutDate: 2006-04-27 10:52:42
Subject: Re: ANSI-strict pointer aliasing rules
Previous:From: Andrew DunstanDate: 2006-04-27 10:04:19
Subject: Re: ANSI-strict pointer aliasing rules

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