summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2017-03-10 19:14:06 +0000
committerAndres Freund2017-03-10 19:19:54 +0000
commitf8f1430ae709c0018a217c77893754f38b3c5b93 (patch)
treefdae5349ec0cbc6f7748753c81725e6d595c7794
parentf39ddd843667c68f760cb4cf23c89c1f1d9aebb8 (diff)
Enable 64 bit atomics on ARM64.
Previously they were disabled due to performance concerns on 32bit arm, where 64bit atomics are often implemented via kernel traps. Author: Roman Shaposhnik Discussion: http://postgr.es/m/CA+ULb+uErkFuXUCCXWHYvnV5KnAyjGUzzRcPA-M0cgO+Hm4RSA@mail.gmail.com
-rw-r--r--src/include/port/atomics/arch-arm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/port/atomics/arch-arm.h b/src/include/port/atomics/arch-arm.h
index 563531c2d6..58614ae2ca 100644
--- a/src/include/port/atomics/arch-arm.h
+++ b/src/include/port/atomics/arch-arm.h
@@ -18,8 +18,9 @@
#endif
/*
- * 64 bit atomics on arm are implemented using kernel fallbacks and might be
- * slow, so disable entirely for now.
- * XXX: We might want to change that at some point for AARCH64
+ * 64 bit atomics on ARM32 are implemented using kernel fallbacks and thus
+ * might be slow, so disable entirely. On ARM64 that problem doesn't exist.
*/
+#if !defined(__aarch64__) && !defined(__aarch64)
#define PG_DISABLE_64_BIT_ATOMICS
+#endif /* __aarch64__ || __aarch64 */