Re: [HACKERS] lock support for aarch64

2013-05-13 Thread Tom Lane
Heikki Linnakangas writes: > On 13.05.2013 18:14, Tom Lane wrote: >> Couldn't we just do >> -#if defined(__arm__) || defined(__arm) >> +#if defined(__arm__) || defined(__arm) || defined(__aarch64__) > That would imply falling back to swpb instruction also on aarch64, which > won't work. It does

Re: [HACKERS] lock support for aarch64

2013-05-13 Thread Heikki Linnakangas
On 13.05.2013 18:14, Tom Lane wrote: Mark Salter writes: I used the following patch to add lock support aarch64. It is just a copy of the arm support based on gcc builtins. Postgresql built with this patch passes the various tests. Couldn't we just do -#if defined(__arm__) || defined(__arm)

Re: [HACKERS] lock support for aarch64

2013-05-13 Thread Heikki Linnakangas
On 13.05.2013 17:26, Merlin Moncure wrote: I'm starting to wonder why we don't always use gcc atomics if they are available and assembly implementation is not (any maybe, even if it is). That was discussed a while ago, but there were a lot of claims that __sync_lock_test_and_set is broken on m

Re: [HACKERS] lock support for aarch64

2013-05-13 Thread Tom Lane
Mark Salter writes: > I used the following patch to add lock support aarch64. It is just a > copy of the arm support based on gcc builtins. Postgresql built with > this patch passes the various tests. Couldn't we just do -#if defined(__arm__) || defined(__arm) +#if defined(__arm__) || defined(__

Re: [HACKERS] lock support for aarch64

2013-05-13 Thread Merlin Moncure
On Mon, May 13, 2013 at 8:15 AM, Heikki Linnakangas wrote: > On 13.05.2013 15:39, Mark Salter wrote: >> >> I used the following patch to add lock support aarch64. It is just a >> copy of the arm support based on gcc builtins. Postgresql built with >> this patch passes the various tests. > > > I th

Re: [HACKERS] lock support for aarch64

2013-05-13 Thread Mark Salter
On Mon, 2013-05-13 at 16:15 +0300, Heikki Linnakangas wrote: > On 13.05.2013 15:39, Mark Salter wrote: > > I used the following patch to add lock support aarch64. It is just a > > copy of the arm support based on gcc builtins. Postgresql built with > > this patch passes the various tests. > > I th

Re: [HACKERS] lock support for aarch64

2013-05-13 Thread Heikki Linnakangas
On 13.05.2013 15:39, Mark Salter wrote: I used the following patch to add lock support aarch64. It is just a copy of the arm support based on gcc builtins. Postgresql built with this patch passes the various tests. I think this needs an "#ifdef HAVE_GCC_INT_ATOMICS", like the ARM codepath. If

[HACKERS] lock support for aarch64

2013-05-13 Thread Mark Salter
I used the following patch to add lock support aarch64. It is just a copy of the arm support based on gcc builtins. Postgresql built with this patch passes the various tests. diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index d4a783f..624a73b 100644 --- a/src/include/st