Subject: Re: xen/clock.c:get_tsc_offset_ns
To: None <port-xen@NetBSD.org>
From: Jed Davis <jdev@panix.com>
List: port-xen
Date: 01/13/2006 02:24:27
YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> writes:

>> > 2) If so, how much is this breaking?
>> 
>> The answer may be "quite a lot", if the shared_info time stuff is
>> updated as infrequently as it sounds like.  Also:
>
> given the overflow and the frequency of today's cpus,
> this function always return a quite small value, compared to NS_PER_TICK.
> so it's effectively just ignored, i think.

More or less; I instrumented the function (to write the value of
tsc_delta into a little ring buffer so I can examine the last 32 from
ddb), and sometimes the delta is a significant fraction of a tick if
there's disk I/O going on.  The overall magnitude, I think, might be
enough to cause slight drift (I'm still a little unclear on the
workings of cc_microtime), but it's not the problem I'm actually
having, more on which in a moment.

-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))