On 2016-04-13 11:27:09 -0400, Robert Haas wrote: > That page is sort of confusing, because it says that platform has > those things but then says ***, which is footnoted to mean "linux > kernel emulation available", but it's not too clear whether that > applies to all atomics or just 8-byte atomics. The operator > precedence of / (used as a separator) vs. footnotes is not stated.
/ has a higher precedence than footnotes. Not sure how to make that easily clear. I'm not exactly a mediawiki expert. > It's also not clear what "linux kernel emulation available" actually > means. Should we think of those things being fast, or slow? Slow. It means that the compiler generates a syscall to perform the atomic. The syscall disables preemption, then performs the actual math, re-enables preemption, and returns. That's a lot more expensive than a spinlock. There's /* * 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 */ #define PG_DISABLE_64_BIT_ATOMICS for that reason (in the current tree, not patch). The whole fallback facility exists to make it easier to port software to arm; but I wouldn't want to rely on it if not necessary. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers