[PATCH] audo-detect and use -moutline-atomics compilation flag for aarch64 - Mailing list pgsql-hackers

From Zidenberg, Tsahi
Subject [PATCH] audo-detect and use -moutline-atomics compilation flag for aarch64
Date
Msg-id 099F69EE-51D3-4214-934A-1F28C0A1A7A7@amazon.com
Whole thread Raw
Responses Re: [PATCH] audo-detect and use -moutline-atomics compilation flag for aarch64  ("Zidenberg, Tsahi" <tsahee@amazon.com>)
Re: [PATCH] audo-detect and use -moutline-atomics compilation flag for aarch64  (Andres Freund <andres@anarazel.de>)
Re: [PATCH] audo-detect and use -moutline-atomics compilation flag for aarch64  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Outline-atomics is a gcc compilation flag that adds runtime detection of weather or not the cpu supports atomic
instructions.CPUs that don't support atomic instructions will use the old load-exclusive/store-exclusive instructions.
Ifa different compilation flag defined an architecture that unconditionally supports atomic instructions (e.g.
-march=armv8.2),the outline-atomic flag will have no effect.
 

The patch was tested to improve pgbench simple-update by 10% and sysbench write-only by 3% on a 64-core armv8.2 machine
(AWSm6g.16xlarge). Select-only and read-only benchmarks were not significantly affected, and neither was performance on
a16-core armv8.0 machine that does not support atomic instructions (AWS a1.4xlarge).
 

The patch uses an existing configure.in macro to detect compiler support of the flag. Checking for aarch64 machine is
notstrictly necessary, but was added for readability.
 

Thank you!
Tsahi




Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: min_safe_lsn column in pg_replication_slots view
Next
From: Bruce Momjian
Date:
Subject: Re: SQL-standard function body