On Tue, Dec 27, 2016 at 10:34 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > I also tried FreeBSD 11.0 on another Mac (2.3GHz x86_64), > and found that gettimeofday as well as basically all their > clock_gettime variants run in 27 to 28 ns; and clock_gettime > reliably delivers full precision, except for CLOCK_SECOND which > is intentionally truncated to 1s precision. So there would be > no need to work with anything but CLOCK_MONOTONIC here. > > However, it seems that these impressive results date back only to > June 2012, cf > https://github.com/freebsd/freebsd/commit/13a9f42818f6b89a72b3e40923be809b490400d8 > and at least as of that commit, only x86 and x86_64 had the fast > clock_gettime code. Older FreeBSD, or FreeBSD on another architecture, > is likely to be a lot worse. But I lack an installation to try.
That commit is in every 'production' and 'legacy' release of FreeBSD[1], meaning as far back as 9.3 (expected to be EoL in the next few days), because it landed in 9.2 (EoL). ARM support landed in FreeBSD 11.0[2]. That leaves the following architectures without fast-path time functions: macaque:freebsd munro$ git grep 'trivial-vdso_tc.c' lib/libc/mips/sys/Makefile.inc:SRCS+= trivial-vdso_tc.c lib/libc/powerpc/Makefile.inc:SRCS+= trivial-vdso_tc.c lib/libc/powerpc64/Makefile.inc:SRCS+= trivial-vdso_tc.c lib/libc/powerpcspe/Makefile.inc:SRCS+= trivial-vdso_tc.c lib/libc/riscv/sys/Makefile.inc:SRCS+= trivial-vdso_tc.c lib/libc/sparc64/Makefile.inc:SRCS+= trivial-vdso_tc.c [1] https://www.freebsd.org/releases/ [2] https://github.com/freebsd/freebsd/commit/80e8626b434515d16b3576174438526755336810 -- Thomas Munro http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers