Re: postgres has no spinlock support on riscv rv64imafdc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Henry <rrh(dot)henry(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: postgres has no spinlock support on riscv rv64imafdc
Date: 2019-12-14 04:05:38
Message-ID: 26613.1576296338@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> On Saturday, October 19, 2019, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Juan José Santamaría Flecha 2019-12-14 08:40:19 Re: BUG #16165: Query Works fine but spam so many LOG: unrecognized win32 error code: 38
Previous Message Thomas Munro 2019-12-14 04:01:05 Re: BUG #16104: Invalid DSA Memory Alloc Request in Parallel Hash