Re: Making wait events a bit more efficient

From: Andres Freund <andres(at)anarazel(dot)de>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Making wait events a bit more efficient
Date: 2021-04-02 20:10:11
Message-ID: 20210402201011.mrjd2p4pb2zg33qt@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-04-02 13:06:35 -0700, Zhihong Yu wrote:
> +extern PGDLLIMPORT uint32 *my_wait_event_info;
>
> It seems volatile should be added to the above declaration. Since later:
>
> + *(volatile uint32 *) my_wait_event_info = wait_event_info;

Why? We really just want to make the store volatile, nothing else. I
think it's much better to annotate that we want individual stores to
happen regardless of compiler optimizations, rather than all
interactions with a variable.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ken Tanzer 2021-04-02 20:20:26 Re: Have I found an interval arithmetic bug?
Previous Message Zhihong Yu 2021-04-02 20:06:35 Re: Making wait events a bit more efficient