| From: | Jesper Pedersen <jpederse(at)redhat(dot)com> |
|---|---|
| To: | Sokolov Yura <funny(dot)falcon(at)postgrespro(dot)ru> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Fix performance of generic atomics |
| Date: | 2017-09-05 17:47:38 |
| Message-ID: | f56bed8f-b887-efc0-bae1-cf5847c2dc68@redhat.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On 05/25/2017 11:12 AM, Sokolov Yura wrote:
> I agree that lonely semicolon looks bad.
> Applied your suggestion for empty loop body (/* skip */).
>
> Patch in first letter had while(true), but I removed it cause
> I think it is uglier:
> - `while(true)` was necessary for grouping read with `if`,
> - but now there is single statement in a loop body and it is
> condition for loop exit, so it is clearly just a loop.
>
> Optimization is valid cause compare_exchange always store old value
> in `old` variable in a same atomic manner as atomic read.
>
I have tested this patch on a 2-socket machine, but don't see any
performance change in the various runs. However, there is no regression
either in all cases.
As such, I have marked the entry "Ready for Committer".
Remember to add a version postfix to your patches such that is easy to
identify which is the latest version.
Best regards,
Jesper
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavel Stehule | 2017-09-05 17:51:51 | Re: PoC plpgsql - possibility to force custom or generic plan |
| Previous Message | Simon Riggs | 2017-09-05 17:41:11 | Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version. |