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

Re: BUG #2401: spinlocks not available on amd64

From: Gregory Stark <stark(at)mit(dot)edu>
To: Theo Schlossnagle <jesus(at)omniti(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: BUG #2401: spinlocks not available on amd64
Date: 2009-06-24 15:27:02
Message-ID: 877hz1abzt.fsf_-_@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
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

In response to

Responses

pgsql-bugs by date

Next:From: Theo SchlossnagleDate: 2009-06-24 15:29:13
Subject: Re: BUG #2401: spinlocks not available on amd64
Previous:From: Magnus HaganderDate: 2009-06-24 14:01:50
Subject: Re: GetTokenInformation() and FreeSid() at port/exec.c

pgsql-patches by date

Next:From: Theo SchlossnagleDate: 2009-06-24 15:29:13
Subject: Re: BUG #2401: spinlocks not available on amd64
Previous:From: Teodor SigaevDate: 2009-02-11 14:53:36
Subject: Re: [PATCHES] GIN improvements

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