dbTalk Databases Forums  

Re: [BUGS] BUG #2401: spinlocks not available on amd64

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] BUG #2401: spinlocks not available on amd64 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #2401: spinlocks not available on amd64 - 04-19-2006 , 10:19 PM






Theo Schlossnagle wrote:
Quote:
The following bug has been logged online:

Bug reference: 2401
Logged by: Theo Schlossnagle
Email address: jesus (AT) omniti (DOT) com
PostgreSQL version: 8.1.3
Operating system: Solaris 10
Description: spinlocks not available on amd64
Details:

Compiling 8.1.3 on solaris 10 x86 with Sun Studio 11 for amd64 target
architecture leads us to an error resulting from no available "tas"
assembly.

The tas.s file doesn't look like valid assembly for the shipped Sun
assembler.
Yes. We will have a fix for it in 8.2, but it was too risky for 8.1.X.
You can try a snapshot tarball from our FTP server and see if that works.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2401: spinlocks not available on amd64 - 04-20-2006 , 09:39 AM






Bruce Momjian <pgman (AT) candle (DOT) pha.pa.us> writes:
Quote:
OK, this is a great help. If you think it should be just one file we
can do that, but since the are separate instructions sets, separate
files I think still makes sense.
There is no reason for the i386 or AMD64 code to be different from what's
already tested on Linux --- the hardware's the same and the OS surely
doesn't make a difference at this level.

Does Solaris' assembler really support C-style "#if defined()"
constructs in .s files? That seems moderately unlikely.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #3  
Old   
Joshua Berkus
 
Posts: n/a

Default Re: [BUGS] BUG #2401: spinlocks not available on amd64 - 04-21-2006 , 09:49 AM



Robert,

Is there someone on the Solaris build team who should be seeing this thread?

Josh Berkus
PostgreSQL @ Sun
San Francisco


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote
  #4  
Old   
Robert Lor
 
Posts: n/a

Default Re: [BUGS] BUG #2401: spinlocks not available on amd64 - 04-21-2006 , 10:16 AM



I'm copying Jim Gates who has started looking into this issue. He's out
this week.

-Robert

Joshua Berkus wrote:

Quote:
Robert,

Is there someone on the Solaris build team who should be seeing this thread?

Josh Berkus
PostgreSQL @ Sun
San Francisco


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #5  
Old   
Theo Schlossnagle
 
Posts: n/a

Default Re: [BUGS] BUG #2401: spinlocks not available on amd64 - 06-24-2009 , 10:29 AM



The amd64 spintlock instructions use no AMD-specific features. It's
base intel 64bit instruction set. We ship a product with similar such
spin locks and have never had an issue across a large variety of
chipsets (Intel, AMD, and virtualized).

In short, if you can actually run 64bit code, the CAS stuff should
just work.

On Jun 24, 2009, at 8:27 AM, Gregory Stark wrote:

Quote:
Theo Schlossnagle wrote:

Tom Lane wrote:

There is no reason for the i386 or AMD64 code to be different from
what's
already tested on Linux --- the hardware's the same and the OS
surely
doesn't make a difference at this level.

On linux you use gcc, which allows for inline assembly. So, the
code is
already very different.

How does this interact with binary builds such as rpms? If someone
installs an
amd64 binary on an x86 machine or vice versa does this assembly do
the right
thing at all? Does it perform slowly?

Ideally we would compile both and pick the right one at run-time but
that
might have annoying overhead if there's a branch before every
pg_atomic_cas
call.

Perhaps a minimal thing to do would be to detect a mismatch on
startup and log
a message about it.

--
Gregory Stark
http://mit.edu/~gsstark/resume.pdf
--
Theo Schlossnagle
http://omniti.com/is/theo-schlossnagle
p: +1.443.325.1357 x201 f: +1.410.872.4911






--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
  #6  
Old   
Gregory Stark
 
Posts: n/a

Default Re: [BUGS] BUG #2401: spinlocks not available on amd64 - 06-24-2009 , 10:29 AM



Theo Schlossnagle wrote:

Quote:
Tom Lane wrote:

There is no reason for the i386 or AMD64 code to be different from what's
already tested on Linux --- the hardware's the same and the OS surely
doesn't make a difference at this level.

On linux you use gcc, which allows for inline assembly. So, the code is
already very different.
How does this interact with binary builds such as rpms? If someone installs an
amd64 binary on an x86 machine or vice versa does this assembly do the right
thing at all? Does it perform slowly?

Ideally we would compile both and pick the right one at run-time but that
might have annoying overhead if there's a branch before every pg_atomic_cas
call.

Perhaps a minimal thing to do would be to detect a mismatch on startup and log
a message about it.

--
Gregory Stark
http://mit.edu/~gsstark/resume.pdf

--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.