CLOCK_MONOTONIC / CLOCK_UPTIME is not really monotonic between threads

Maxim Sobolev sobomax at
Fri Jun 3 14:28:33 UTC 2016

a. multiple cores.
b. makes no difference
c. yes, I believe so

kern.timecounter.tsc_shift: 1
kern.timecounter.smp_tsc_adjust: 0
kern.timecounter.smp_tsc: 1
kern.timecounter.invariant_tsc: 1
machdep.tsc_freq: 2658118740
machdep.disable_tsc_calibration: 0
machdep.disable_tsc: 0

d. no, single socket Intel Q6700. I've also seen this problem on core
i7-4770 running virtualbox 5.x. I have a hints that this also happens on
our bigger production boxes, but I have no specifics yet.

On Thu, Jun 2, 2016 at 10:05 PM, Adrian Chadd <adrian.chadd at>

> [snip]
> a) is it on one core, or multiple cores?
> c) is it on a system that /has/ invariant-TSC ?
> d) is this a multi-socket system?
> -adrian

More information about the freebsd-questions mailing list