xref: /freebsd/share/man/man4/ffclock.4 (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1.\" Copyright (c) 2011 The University of Melbourne
2.\" All rights reserved.
3.\"
4.\" This documentation was written by Julien Ridoux at the University of
5.\" Melbourne under sponsorship from the FreeBSD Foundation.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd December 1, 2011
29.Dt FFCLOCK 4
30.Os
31.Sh NAME
32.Nm FFCLOCK
33.Nd Feed-forward system clock
34.Sh SYNOPSIS
35.Cd options FFCLOCK
36.Sh DESCRIPTION
37The
38.Xr ntpd 8
39daemon has been the dominant solution for system clock synchronisation for many
40years, which has in turn influenced the design of the system clock.
41The ntpd daemon implements a feedback control algorithm which has been
42demonstrated to perform poorly in common use cases.
43.Pp
44Feed-forward clock synchronisation algorithms implemented by an appropriate
45daemon, in concert with the
46.Nm
47kernel support, have been shown to provide highly robust and accurate clock
48synchronisation.
49In addition to time keeping, the
50.Nm
51kernel mechanism provides new timestamping capabilities and the ability to
52use specialised clocks.
53Feed-forward synchronisation is also very well suited for virtualised
54environments, reducing the overhead of timekeeping in guests and ensuring
55continued smooth operation of the system clock during guest live migration.
56.Pp
57The
58.Nm
59kernel support provides feed-forward timestamping functions within the kernel
60and system calls to support feed-forward synchronisation daemons
61.Po see
62.Xr ffclock 2
63.Pc .
64.Ss Kernel Options
65The following kernel configuration options are related to
66.Nm :
67.Pp
68.Bl -tag -width ".Dv FFCLOCK" -compact
69.It Dv FFCLOCK
70Enable feed-forward clock support.
71.El
72.Ss Configuration
73When feed-forward clock support is compiled into the kernel, multiple system
74clocks become available to choose from.
75System clock configuration is possible via the
76.Va kern.sysclock
77.Xr sysctl 8
78tree which provides the following variables:
79.Bl -tag -width "    " -offset indent
80.It Va kern.sysclock.active
81Name of the current active system clock which is serving time.
82Set to one of the names in
83.Va kern.sysclock.available
84in order to change the default active system clock.
85.It Va kern.sysclock.available
86Lists the names of available system clocks
87.Po
88read-only
89.Pc .
90.El
91.Pp
92Feed-forward system clock configuration is possible via the
93.Va kern.sysclock.ffclock
94sysctl tree which provides the following variables:
95.Bl -tag -width "    " -offset indent
96.It Va kern.sysclock.ffclock.version
97Feed-forward clock kernel version
98.Po
99read-only
100.Pc .
101.It Va kern.sysclock.ffclock.ffcounter_bypass
102Use reliable hardware timecounter as the feed-forward counter.
103Will eventually be useful for virtualised environment like
104.Xr xen 4 ,
105but currently does nothing.
106.El
107.Sh SEE ALSO
108.Xr clock_gettime 2 ,
109.Xr ffclock 2 ,
110.Xr bpf 4 ,
111.Xr timecounters 4 ,
112.Xr sysctl 8
113.Sh HISTORY
114Feed-forward clock support first appeared in
115.Fx 10.0 .
116.Sh AUTHORS
117.An -nosplit
118The feed-forward clock support was written by
119.An Julien Ridoux Aq Mt jridoux@unimelb.edu.au
120in collaboration with
121.An Darryl Veitch Aq Mt dveitch@unimelb.edu.au
122at the University of Melbourne under sponsorship from the FreeBSD Foundation.
123.Pp
124This manual page was written by
125.An Julien Ridoux Aq Mt jridoux@unimelb.edu.au
126and
127.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org .
128