Re: spinlock support on loongarch64

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 吴亚飞 <wuyf41619(at)hundsun(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: spinlock support on loongarch64
Date: 2022-11-02 15:37:35
Message-ID: 1658834.1667403455@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?gb2312?B?zuLRx7fJ?= <wuyf41619(at)hundsun(dot)com> writes:
> add spinlock support on loongarch64.

I wonder if we shouldn't just do that (ie, try to use
__sync_lock_test_and_set) as a generic fallback on any unsupported
architecture. We could get rid of the separate stanza for RISC-V
that way. The main thing that an arch-specific stanza could bring
is knowledge of the best data type width to use for a spinlock;
but I don't see a big problem with defaulting to "int". We can
always add arch-specific stanzas for any machines where that's
shown to be a seriously poor choice.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jehan-Guillaume de Rorthais 2022-11-02 16:24:35 Re: psql: Add command to use extended query protocol
Previous Message Ankit Kumar Pandey 2022-11-02 15:26:53 Re: Check return value of pclose() correctly