Re: postgres has no spinlock support on riscv rv64imafdc - Mailing list pgsql-bugs

From Tom Lane
Subject Re: postgres has no spinlock support on riscv rv64imafdc
Date
Msg-id 26613.1576296338@sss.pgh.pa.us
Whole thread Raw
In response to Re: postgres has no spinlock support on riscv rv64imafdc  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-bugs
Merlin Moncure <mmoncure@gmail.com> writes:
> On Saturday, October 19, 2019, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The reason I'm skeptical of that line of argument is that gcc's track
>> record for support of these intrinsics on non-mainstream architectures
>> is just sucky.  Now maybe, somebody was careful and it all works great
>> on RISC-V.  But IMO, the burden of proof is to show that the intrinsics
>> work, not to show that they don't.

> Do our regression tests exercise the quality of the intrinsic
> implementation?

Only indirectly, to the extent that a broken intrinsic might result
in misbehavior of concurrent operations.  If you dig through the git
history for s_lock.h and the atomics files, you can find plenty of
evidence that it can take awhile for us to notice bugs in this area.

The git history is pretty illuminating, actually (he says having
just searched through it).  There is plenty of evidence there that
both the manually-written-asm and the compiler-intrinsics approaches
can have nasty, hard-to-pin-down bugs.  The thing that makes me
prefer the former is that once we do identify a bug, we can fix it.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: BUG #16104: Invalid DSA Memory Alloc Request in Parallel Hash
Next
From: Juan José Santamaría Flecha
Date:
Subject: Re: BUG #16165: Query Works fine but spam so many LOG: unrecognizedwin32 error code: 38