FFCLOCK(4)

πŸ’– FFCLOCK(4) πŸ’–

okay so bestie, welcome to the Kernel Interfaces Manual β€” this is the page for FFCLOCK, aka the Feed-forward system clock. buckle up, it's giving kernel-internals-cute πŸŽ€


✨ NAME ✨

FFCLOCK β€” Feed-forward system clock πŸ•°οΈπŸ’«


🌸 SYNOPSIS 🌸

options FFCLOCK

that's it. one line. iconic. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so storytime πŸ“–βœ¨. The ntpd(8) daemon has been the dominant solution for system clock synchronisation for like, many many years β€” and the way it ran the game actually shaped how the system clock itself got designed. but here's the tea β˜•: ntpd runs a feedback control algorithm, and that thing has been demonstrated to perform poorly in common use cases. not me calling out a decades-old daemon 😭.

meanwhile, feed-forward clock synchronisation algorithms β€” implemented by an appropriate daemon, working in concert with the FFCLOCK kernel support β€” have been shown to give you clock synchronisation that's highly robust and accurate. slay.

and it's not just timekeeping, bestie. the FFCLOCK kernel mechanism also hands you:

  • new timestamping capabilities πŸ”₯
  • the ability to use specialised clocks πŸ‘‘

feed-forward sync is also very well suited for virtualised environments β€” it reduces the overhead of timekeeping in guests and keeps the system clock running smoothly during guest live migration. the way it just... handles all that. 🧚

so basically, the FFCLOCK kernel support provides feed-forward timestamping functions within the kernel, plus system calls to support feed-forward synchronisation daemons (go peek at ffclock(2) for that part πŸ’–).


πŸ”§ Kernel Options πŸ”§

these are the kernel config options that have anything to do with FFCLOCK:

  • FFCLOCK β€” Enable feed-forward clock support. ⭐

πŸŽ€ Configuration πŸŽ€

when feed-forward clock support is compiled into the kernel, you get multiple system clocks to choose from. yes, plural. we're fancy now.

system clock configuration happens through the kern.sysclock sysctl(8) tree, which gives you these variables:

  • kern.sysclock.active β€” Name of the current active system clock which is serving time. wanna change the default active system clock? set it to one of the names listed in kern.sysclock.available. done. πŸ’«
  • kern.sysclock.available β€” Lists the names of available system clocks. read-only, so don't try it bestie πŸ™ˆ.

and then, feed-forward system clock configuration lives in the kern.sysclock.ffclock sysctl tree, with these variables:

  • kern.sysclock.ffclock.version β€” Feed-forward clock kernel version (read-only). πŸ‘‘
  • kern.sysclock.ffclock.ffcounter_bypass β€” Use a reliable hardware timecounter as the feed-forward counter. it will eventually be useful for virtualised environments like xen(4), but currently does nothing. yeah. it's just vibing in there. πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

clock_gettime(2), ffclock(2), bpf(4), timecounters(4), sysctl(8)

go read them, iykwyk 🫢


πŸ“œ HISTORY πŸ“œ

Feed-forward clock support first appeared in FreeBSD 10.0. a whole era. 🌈


πŸ’œ AUTHORS πŸ’œ

The feed-forward clock support was written by Julien Ridoux <jridoux@unimelb.edu.au> in collaboration with Darryl Veitch <dveitch@unimelb.edu.au> at the University of Melbourne, under sponsorship from the FreeBSD Foundation. πŸ’–

This manual page was written by Julien Ridoux <jridoux@unimelb.edu.au> and Lawrence Stewart <lstewart@FreeBSD.org>. absolute legends, no cap 🫑✨


okay that's the whole page bestie, you ate it, go timestamp something πŸ•°οΈπŸ’…

Debian Β· December 1, 2011 Β· FFCLOCK(4) β€” mwah, thanks for reading, love u, bye πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from