0

I am reading this: https://chrony.tuxfamily.org/manual.html#makestep-command

It mentions, "Normally chronyd will cause the system to gradually correct any time offset, by slowing down or speeding up the clock as required". Most of the Linux machines are using TSC as the source: $ cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc

Given a machine using TSC as the clock source and new Intel CPUs have invariant TSC, how can chrony slow down or speed up the clock? Does it mean it just correct the clock without adjusting TSC as TSC isn't adjustable? I am sure I misunderstand the doc.

Thanks.

Hei
  • 175
  • 1
  • 1
  • 6

1 Answers1

1

The Linux system clock is not quite as simple as just passing through the raw TSC value as-is.

There is a bit of kernel code that figures out how many ticks of TSC are in an unit of time, and slowing down and speeding up the system clock is done by manipulating that conversion.

telcoM
  • 4,448
  • 15
  • 25
  • Thanks. So it is the conversion manipulated but not the TSC frequency right? As TSC frequency in theory shouldn't be able to change given invariant TSC now. Tho, some people said temperature could affect the frequency but not sure whether they referred to the old day -- no invariant TSC. Thought? – Hei May 08 '18 at 15:02
  • "invariant TSC" just means that power management states or processor clock frequency changes (e.g. the Turbo Boost feature) don't affect TSC rate. It is not a miracle device that would be perfectly insensitive to the physical properties of its environment and the parts it's made of. If you're interested in technical details, this discussion might be of interest: https://software.intel.com/en-us/forums/intel-isa-extensions/topic/280440 – telcoM May 08 '18 at 23:02
  • Ok, I thought material science field advanced so quickly or somehow the TSC unit got isolated/insulated that it became stable even under unusual CPU temperature. Thanks for sharing! – Hei May 10 '18 at 07:11