diff options
Diffstat (limited to 'static/freebsd/man4/timecounters.4 3.html')
| -rw-r--r-- | static/freebsd/man4/timecounters.4 3.html | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/static/freebsd/man4/timecounters.4 3.html b/static/freebsd/man4/timecounters.4 3.html new file mode 100644 index 00000000..66eedb55 --- /dev/null +++ b/static/freebsd/man4/timecounters.4 3.html @@ -0,0 +1,97 @@ +<table class="head"> + <tr> + <td class="head-ltitle">TIMECOUNTERS(4)</td> + <td class="head-vol">Device Drivers Manual</td> + <td class="head-rtitle">TIMECOUNTERS(4)</td> + </tr> +</table> +<div class="manual-text"> +<section class="Sh"> +<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> +<p class="Pp"><code class="Nm">timecounters</code> — + <span class="Nd">kernel time counters subsystem</span></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> +<p class="Pp">The kernel uses several types of time-related devices, such as: + real time clocks, time counters and event timers. Real time clocks are + responsible for tracking real world time, mostly when the system is down. + Time counters are responsible for tracking purposes, when the system is + running. Event timers are responsible for generating interrupts at a + specified time or periodically, to run different time-based events. This + page is about the second.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> +<p class="Pp">Time counters are the lowest level of time tracking in the kernel. + They provide monotonically increasing timestamps with known width and update + frequency. They can overflow, drift, etc and so in raw form can be used only + in very limited performance-critical places like the process scheduler.</p> +<p class="Pp" id="tc_windup">More usable time is created by scaling the values + read from the selected time counter and combining it with some offset, + regularly updated by + <a class="permalink" href="#tc_windup"><code class="Fn">tc_windup</code></a>() + on + <a class="permalink" href="#hardclock"><code class="Fn" id="hardclock">hardclock</code></a>() + invocation.</p> +<p class="Pp">Different platforms provide different kinds of timer hardware. The + goal of the time counters subsystem is to provide a unified way to access + that hardware.</p> +<p class="Pp">Each driver implementing time counters registers them with the + subsystem. It is possible to see the list of present time counters, via the + <var class="Va">kern.timecounter</var> <a class="Xr">sysctl(8)</a> + variable:</p> +<div class="Bd Pp Li"> +<pre>kern.timecounter.choice: TSC-low(-100) HPET(950) i8254(0) ACPI-fast(900) dummy(-1000000) +kern.timecounter.tc.ACPI-fast.mask: 16777215 +kern.timecounter.tc.ACPI-fast.counter: 13467909 +kern.timecounter.tc.ACPI-fast.frequency: 3579545 +kern.timecounter.tc.ACPI-fast.quality: 900 +kern.timecounter.tc.i8254.mask: 65535 +kern.timecounter.tc.i8254.counter: 62692 +kern.timecounter.tc.i8254.frequency: 1193182 +kern.timecounter.tc.i8254.quality: 0 +kern.timecounter.tc.HPET.mask: 4294967295 +kern.timecounter.tc.HPET.counter: 3013495652 +kern.timecounter.tc.HPET.frequency: 14318180 +kern.timecounter.tc.HPET.quality: 950 +kern.timecounter.tc.TSC-low.mask: 4294967295 +kern.timecounter.tc.TSC-low.counter: 4067509463 +kern.timecounter.tc.TSC-low.frequency: 11458556 +kern.timecounter.tc.TSC-low.quality: -100</pre> +</div> +<p class="Pp">The output nodes are defined as follows:</p> +<dl class="Bl-inset"> + <dt id="kern.timecounter.tc."><var class="Va">kern.timecounter.tc.</var><var class="Ar">X</var><var class="Va">.mask</var></dt> + <dd>is a bitmask, defining valid counter bits,</dd> + <dt id="kern.timecounter.tc.~2"><var class="Va">kern.timecounter.tc.</var><var class="Ar">X</var><var class="Va">.counter</var></dt> + <dd>is a present counter value,</dd> + <dt id="kern.timecounter.tc.~3"><var class="Va">kern.timecounter.tc.</var><var class="Ar">X</var><var class="Va">.frequency</var></dt> + <dd>is a counter update frequency,</dd> + <dt id="kern.timecounter.tc.~4"><var class="Va">kern.timecounter.tc.</var><var class="Ar">X</var><var class="Va">.quality</var></dt> + <dd>is an integral value, defining the quality of this time counter compared + to others. A negative value means this time counter is broken and should + not be used.</dd> +</dl> +<p class="Pp">The time management code of the kernel automatically switches to a + higher-quality time counter when it registers, unless the + <var class="Va">kern.timecounter.hardware</var> sysctl has been used to + choose a specific device.</p> +<p class="Pp">There is no way to unregister a time counter once it has + registered with the kernel. If a dynamically loaded module contains a time + counter you will not be able to unload that module, even if the time counter + it contains is not the one currently in use.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE + ALSO</a></h1> +<p class="Pp"><a class="Xr">attimer(4)</a>, <a class="Xr">eventtimers(4)</a>, + <a class="Xr">ffclock(4)</a>, <a class="Xr">hpet(4)</a></p> +</section> +</div> +<table class="foot"> + <tr> + <td class="foot-date">August 12, 2015</td> + <td class="foot-os">FreeBSD 15.0</td> + </tr> +</table> |
