From: Dave Winchell <dwinchell@virtualiron.com>
To: "dan.magenheimer@oracle.com" <dan.magenheimer@oracle.com>
Cc: Dave Winchell <dwinchell@virtualiron.com>,
xen-devel <xen-devel@lists.xensource.com>,
Keir Fraser <keir.fraser@eu.citrix.com>,
Ben Guthro <bguthro@virtualiron.com>
Subject: Re: [PATCH 0/2] Improve hpet accuracy
Date: Mon, 09 Jun 2008 17:44:07 -0400 [thread overview]
Message-ID: <484DA427.5080006@virtualiron.com> (raw)
In-Reply-To: <20080609150704468.00000002776@djm-pc>
Dan Magenheimer wrote:
>I'm wondering what is "magic" about 0.03% in all the non-hw-hpet
>measurements.
>
.03% is simply the maximum error we've seen with hpet.
The maximum value (.03) is the same whether its simulated or physical.
The best value physical is .001% and I don't remember the best value
simulated bit I believe it is under .01%, perhaps well under. I'll have
to repeat
that measurement. I would think that simulated and physical would give
roughly
the same drift values, but perhaps at very low drifts that doesn't hold.
I think the .03% is mostly due to the stability of the physical hpet
device on a platform. I've noticed on some platforms, the simulated hpet
time actually improves if you disable the hpet in the bios so that
stime() is layered on the pm timer or whatever.
I would like to get to the bottom of this hpet stability variance
from platform to platform.
Regards,
Dave
> Is that just the accuracy of the underlying tsc
>on your test system, e.g. the skew of tsc relative to an external
>(ntp) source? Or is Xen (tsc-based) system time skewing that much
>on an overcommitted system (and skewing much less than 0.03% on an
>unloaded system)?
>
>Running the following on dom0 both on an unloaded and overcommitted
>system (with ntpd off in dom0 and all guests) might be interesting:
>
># ntpdate $NTPSERVER; sleep 3600; ntpdate -q $NTPSERVER
>
>-----Original Message-----
>From: Dave Winchell [mailto:dwinchell@virtualiron.com]
>Sent: Saturday, June 07, 2008 3:21 PM
>To: Keir Fraser; dan.magenheimer@oracle.com
>Cc: Ben Guthro; xen-devel; Dave Winchell
>Subject: RE: [Xen-devel] [PATCH 0/2] Improve hpet accuracy
>
>
>
>
>>Possibly there are bugs in the hpet device model which are fixed by Dave's
>>patch. If this is actually the case, it would be nice to break those out as
>>separate patches, as I think an 11% drift must largely be due to
>>device-model bugs rather than relatively insignificant differences between
>>hvm_get_guest_time() and physical HPET main counter.
>>
>>
>
>Hi Keir,
>
>I tried an experiment on Friday where I short circuited the missed ticks policy
>code in the hpet.c patch, but used the physical hpet each access. The result for Linux
>was a drift of .1%, same as the xen-unstable bits.
>
>Conversely I get very good drift numbers, i.e., under .03%, when using the missed ticks
>policy code and running in simulated mode (layered on stime) when stime uses hpet.
>
>So clearly, the improvement from .1% to .03% is due to the policy code.
>I haven't run the short circuit test with the windows policy but I can do that
>on Monday.
>
>Note: For Windows and Linux I get < .03% drift using the policy code and running
>simulated mode whether stime is using hpet or some other device.
>
>
>regards,
>Dave
>
>
>
>-----Original Message-----
>From: Keir Fraser [mailto:keir.fraser@eu.citrix.com]
>Sent: Fri 6/6/2008 6:34 PM
>To: dan.magenheimer@oracle.com; Dave Winchell
>Cc: Ben Guthro; xen-devel
>Subject: Re: [Xen-devel] [PATCH 0/2] Improve hpet accuracy
>
>On 6/6/08 21:29, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:
>
>
>
>>Although hwhpet=1 is a fine alternative in many cases, it may
>>be unavailable on some systems and may cause significant performance
>>issues on others. So I think we will still need to track down
>>the poor accuracy when hwhpet=0. And if for some reason
>>Xen system time can't be made accurate enough (< 0.05%), then
>>I think we should consider building Xen system time itself on
>>top of hardware hpet instead of TSC... at least when Xen discovers
>>a capable hpet.
>>
>>
>
>Yes, this would be a sensible extra timer_mode: have hvm_get_guest_time()
>call to the platform time read function, and bypass TSC altogether. This
>would be cleaner than having only the vHPET code punch through to the
>physical HPET: instead we have the boot-time chosen platform timesource used
>by all virtual timers.
>
>
>
>>Or maybe there's a computation error somewhere in the hvm hpet
>>scaling code? Hmmm...
>>
>>
>
>Possibly there are bugs in the hpet device model which are fixed by Dave's
>patch. If this is actually the case, it would be nice to break those out as
>separate patches, as I think an 11% drift must largely be due to
>device-model bugs rather than relatively insignificant differences between
>hvm_get_guest_time() and physical HPET main counter.
>
> -- Keir
>
>
>
next prev parent reply other threads:[~2008-06-09 21:44 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-05 14:59 [PATCH 0/2] Improve hpet accuracy Ben Guthro
2008-06-06 8:58 ` Keir Fraser
2008-06-06 10:45 ` Dave Winchell
2008-06-06 15:53 ` Dan Magenheimer
2008-06-06 17:54 ` Dave Winchell
2008-06-06 19:33 ` Dave Winchell
2008-06-06 20:29 ` Dan Magenheimer
2008-06-06 22:34 ` Keir Fraser
2008-06-07 21:20 ` Dave Winchell
2008-06-09 21:07 ` Dan Magenheimer
2008-06-09 21:44 ` Dave Winchell [this message]
2008-06-08 20:32 ` Dave Winchell
2008-06-08 21:10 ` Dan Magenheimer
2008-06-08 23:26 ` Dave Winchell
2008-06-09 7:36 ` Keir Fraser
2008-06-09 11:13 ` Dave Winchell
2008-06-09 12:03 ` Keir Fraser
2008-06-09 12:10 ` Keir Fraser
2008-06-09 13:08 ` Dave Winchell
2008-06-09 20:48 ` Dan Magenheimer
2008-06-09 21:18 ` Keir Fraser
2008-06-09 21:46 ` Dan Magenheimer
2008-06-08 21:18 ` Dan Magenheimer
2008-06-09 22:02 ` Dan Magenheimer
2008-06-09 23:34 ` Dave Winchell
2008-06-10 3:21 ` Dan Magenheimer
2008-06-11 1:44 ` Dan Magenheimer
2008-06-11 13:58 ` Dave Winchell
2008-06-11 16:47 ` Dan Magenheimer
2008-06-12 22:51 ` Dan Magenheimer
2008-06-10 7:52 ` Keir Fraser
2008-06-10 11:49 ` Dave Winchell
2008-06-10 12:34 ` Dave Winchell
2008-06-10 12:42 ` Keir Fraser
2008-06-10 17:13 ` Dave Winchell
2008-06-11 8:30 ` Keir Fraser
2008-06-11 11:38 ` Dave Winchell
2008-06-06 15:35 ` Steven Hand
2008-06-06 17:34 ` Dave Winchell
[not found] <4851940F.2050307@virtualiron.com>
2008-06-12 22:05 ` Dan Magenheimer
2008-06-12 22:49 ` Dave Winchell
2008-06-13 4:47 ` Dan Magenheimer
2008-06-13 7:33 ` Keir Fraser
2008-06-13 15:39 ` Dan Magenheimer
2008-06-13 12:08 ` Dave Winchell
2008-06-13 14:58 ` Dave Winchell
2008-06-13 15:52 ` Dan Magenheimer
2008-06-13 16:53 ` Dave Winchell
2008-06-13 0:38 ` Dave Winchell
2008-06-13 2:21 ` Dan Magenheimer
2008-06-13 3:12 ` Dave Winchell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=484DA427.5080006@virtualiron.com \
--to=dwinchell@virtualiron.com \
--cc=bguthro@virtualiron.com \
--cc=dan.magenheimer@oracle.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.