From: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
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:42:42 |
Message-ID: | CALNJ-vTOgLdVkbXw1rd=fkVmCoouxPzk2A_2PZdoO-wUDCcz7g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Maybe I am not familiar with your patch.
I don't see where my_wait_event_info is read (there is no getter method in
the patch).
In that case, it is fine omitting volatile in the declaration.
Cheers
On Fri, Apr 2, 2021 at 1:10 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2021-04-02 20:44:22 | Re: Making wait events a bit more efficient |
Previous Message | Zhihong Yu | 2021-04-02 20:27:33 | Re: Have I found an interval arithmetic bug? |