aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/timeffc.h
Commit message (Collapse)AuthorAgeFilesLines
* Introduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. TheLawrence Stewart2011-12-241-12/+68
| | | | | | | | | | | | | | | | | | | | | | | sysclock_getsnapshot() function allows the caller to obtain a snapshot of all the system clock and timecounter state required to create time stamps at a later point. The sysclock_snap2bintime() function converts a previously obtained snapshot into a bintime time stamp according to the specified flags e.g. which system clock, uptime vs absolute time, etc. These KPIs enable useful functionality, including direct comparison of the feedback and feed-forward system clocks and generation of multiple time stamps with different formats from a single timecounter read. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ In collaboration with: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=228856
* Revise the sysctl handling code and restructure the hierarchy of sysctlsLawrence Stewart2011-12-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | introduced when feed-forward clock support is enabled in the kernel: - Rename the "choice" variable to "available". - Streamline the implementation of the "active" variable's sysctl handler function. - Create a kern.sysclock sysctl node for general sysclock related configuration options. Place the "available" and "active" variables under this node. - Create a kern.sysclock.ffclock sysctl node for feed-forward clock specific configuration options. Place the "version" and "ffcounter_bypass" variables under this node. - Tweak some of the description strings. Discussed with: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=228173
* Make sysclock_active publicly available to external consumers.Lawrence Stewart2011-11-291-0/+1
| | | | | | | | | | | | | | Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Discussed with: Julien Ridoux (jridoux at unimelb edu au) Submitted by: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=228125
* Introduce the new "fromclock" public wrapper API which allows consumers toLawrence Stewart2011-11-291-0/+126
| | | | | | | | | | | | | | | | | | | | select which system clock to obtain time from, independent of the current default system clock. In the brave new multi sysclock world, both feedback and feed-forward system clocks can be maintained and used concurrently, so this API provides a minimalist first step for interested consumers to exercise control over their choice of system clock. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Discussed with: Julien Ridoux (jridoux at unimelb edu au) Submitted by: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=228118
* Make the fbclock_[get]{bin,nano,micro}[up]time() function prototypes public soLawrence Stewart2011-11-291-0/+22
| | | | | | | | | | | | | | | | | that new APIs with some performance sensitivity can be built on top of them. These functions should not be called directly except in special circumstances. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Discussed with: Julien Ridoux (jridoux at unimelb edu au) Submitted by: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=228117
* - Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate()Lawrence Stewart2011-11-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | system calls to provide feed-forward clock management capabilities to userspace processes. ffclock_getcounter() returns the current value of the kernel's feed-forward clock counter. ffclock_getestimate() returns the current feed-forward clock parameter estimates and ffclock_setestimate() updates the feed-forward clock parameter estimates. - Document the syscalls in the ffclock.2 man page. - Regenerate the script-derived syscall related files. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Submitted by: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=227776
* - Provide a sysctl interface to change the active system clock at runtime.Lawrence Stewart2011-11-201-0/+36
| | | | | | | | | | | | | | | | | | | | - Wrap [get]{bin,nano,micro}[up]time() functions of sys/time.h to allow requesting time from either the feedback or the feed-forward clock. If a feedback (e.g. ntpd) and feed-forward (e.g. radclock) daemon are both running on the system, both kernel clocks are updated but only one serves time. - Add similar wrappers for the feed-forward difference clock. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Submitted by: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=227747
* Fix a whitespace nit.Lawrence Stewart2011-11-201-1/+1
| | | | | | | Submitted by: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=227746
* Provide high-level functions to access the feed-forward absolute and differenceLawrence Stewart2011-11-201-0/+23
| | | | | | | | | | | | | | | | | clocks. Each routine can output an upper bound on the absolute time or time interval requested. Different flavours of absolute time can be requested, for example with or without leap seconds, monotonic or not, etc. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Submitted by: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=227745
* Core structure and functions to support a feed-forward clock within the kernel.Lawrence Stewart2011-11-191-0/+110
Implement ffcounter, a monotonically increasing cumulative counter on top of the active timecounter. Provide low-level functions to read the ffcounter and convert it to absolute time or a time interval in seconds using the current ffclock estimates, which track the drift of the oscillator. Add a ring of fftimehands to track passing of time on each kernel tick and pick up updates of ffclock estimates. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Submitted by: Julien Ridoux (jridoux at unimelb edu au) Notes: svn path=/head/; revision=227723