Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
От | Andres Freund |
---|---|
Тема | Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < |
Дата | |
Msg-id | 20160413153807.3ztdnh2ugu3xjzxc@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
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: Wemight 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
В списке pgsql-hackers по дате отправления: