Module Name: src Committed By: jruoho Date: Wed Nov 20 18:13:16 UTC 2013
Modified Files: src/share/man/man9/man9.x86: tsc.9 Log Message: Don't be so pessimistic. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/man9.x86/tsc.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man9/man9.x86/tsc.9 diff -u src/share/man/man9/man9.x86/tsc.9:1.4 src/share/man/man9/man9.x86/tsc.9:1.5 --- src/share/man/man9/man9.x86/tsc.9:1.4 Tue Oct 25 05:41:35 2011 +++ src/share/man/man9/man9.x86/tsc.9 Wed Nov 20 18:13:16 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: tsc.9,v 1.4 2011/10/25 05:41:35 jruoho Exp $ +.\" $NetBSD: tsc.9,v 1.5 2013/11/20 18:13:16 jruoho Exp $ .\" .\" Copyright (c) 2011 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 25, 2011 +.Dd November 20, 2013 .Dt TSC 9 x86 .Os .Sh NAME @@ -59,32 +59,25 @@ register has been present since the orig .Pp Already because of the access method, .Tn TSC -has traditionally provided a low-overhead and high-resolution +provides a low-overhead and high-resolution way to obtain .Tn CPU timing information. -Recently, however, this reliability has been undermined by -such factors as system sleep states, +This traditional premise was violated when such factors as +system sleep states, .Tn CPU .Dq hotplugging , .Dq hibernation , and .Tn CPU -frequency scaling. -.Pp -These potential new sources of unreliability are easily understandable -when one recalls that the counter measures cycles and not -.Dq time . -Comparing the cycle counts only makes sense when the clock frequency -is stable; to convert the cycle counts to time units, a general equation -would be: -.Dq seconds = cycles / frequency in Hz . -The use of -.Tn TSC -as a source of high-resolution timing can be thus discouraged. -But the basic premise is still guaranteed: -.Tn TSC -is a monotonically increasing counter. +frequency scaling +were introduced to the x86 lineage. +This was however mainly a short abruption: +in many new x86 +.Tn CPUs +the time stamp counter is again invariant with +respect to the stability of the clock frequency. +Care should be however taken in implementations that rely on this assumption. .Sh FUNCTIONS .Bl -tag -width abcd .It Fn rdtsc ""