Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9/man9.x86 Don't be so pessimistic.



details:   https://anonhg.NetBSD.org/src/rev/173ae5d60981
branches:  trunk
changeset: 791486:173ae5d60981
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Wed Nov 20 18:13:16 2013 +0000

description:
Don't be so pessimistic.

diffstat:

 share/man/man9/man9.x86/tsc.9 |  33 +++++++++++++--------------------
 1 files changed, 13 insertions(+), 20 deletions(-)

diffs (62 lines):

diff -r 2287e112cfae -r 173ae5d60981 share/man/man9/man9.x86/tsc.9
--- a/share/man/man9/man9.x86/tsc.9     Wed Nov 20 17:50:39 2013 +0000
+++ b/share/man/man9/man9.x86/tsc.9     Wed Nov 20 18:13:16 2013 +0000
@@ -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 @@
 .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 ""



Home | Main Index | Thread Index | Old Index