Re: ReadRecentBuffer() doesn't scale well - Mailing list pgsql-hackers

From Ants Aasma
Subject Re: ReadRecentBuffer() doesn't scale well
Date
Msg-id CANwKhkM5QyO-G6Tvb46M1SaPc7VkoScDfSRrL-71md9Oo1-v-w@mail.gmail.com
Whole thread Raw
In response to Re: ReadRecentBuffer() doesn't scale well  (Andres Freund <andres@anarazel.de>)
Responses Re: ReadRecentBuffer() doesn't scale well
List pgsql-hackers
On Tue, 27 Jun 2023 at 18:40, Andres Freund <andres@anarazel.de> wrote:
> On 2023-06-27 14:49:48 +0300, Ants Aasma wrote:
> > If you want to experiment, here is a rebased version of something I
> > hacked up a couple of years back on the way to Fosdem Pgday. I didn't
> > pursue it further because I didn't have a use case where it showed a
> > significant difference.
>
> Thanks for posting!
>
> Based on past experiments, anything that requires an atomic op during spinlock
> release on x86 will be painful :/. I'm not sure there's a realistic way to
> avoid that with futexes though :(.

Do you happen to know if a plain xchg instruction counts as an atomic
for this? I haven't done atomics stuff in a while, so I might be
missing something, but at first glance I think using a plain xchg
would be enough for the releasing side.

-- 
Ants



pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: Incremental View Maintenance, take 2
Next
From: Jacob Champion
Date:
Subject: Re: [PATCH] Honor PG_TEST_NOCLEAN for tempdirs