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