pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Robert Henry <rrh.henry@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: postgres has no spinlock support on riscv rv64imafdc
Date: Fri, 13 Dec 2019 23:05:38 -0500
Message-ID: <26613.1576296338@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHyXU0zwtb_79=-BPSF5CTLET1cYYBX=EUsNqGDGUWo-6SXdVw@mail.gmail.com>
References: <CAEYr_8nnwxQji0pQJYqFx7=gSM8x7jFJi16O-bLuVYvqvkjsLg@mail.gmail.com>
	<27501.1571382023@sss.pgh.pa.us>
	<20191019102234.s7utdy44npjqr7in@alap3.anarazel.de>
	<16913.1571545387@sss.pgh.pa.us>
	<CAHyXU0zwtb_79=-BPSF5CTLET1cYYBX=EUsNqGDGUWo-6SXdVw@mail.gmail.com>

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





view thread (10+ messages)  latest in thread

Message-ID: <26613.1576296338@sss.pgh.pa.us>
Permalink:  ../26613.1576296338@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26613.1576296338@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mmoncure@gmail.com, andres@anarazel.de, rrh.henry@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: postgres has no spinlock support on riscv rv64imafdc
  In-Reply-To: <26613.1576296338@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox