WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [Patch] time resolution fix.

To: "Dong, Eddie" <eddie.dong@xxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] time resolution fix.
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 20 Mar 2006 16:48:43 +0000
Cc: xen-devel Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Delivery-date: Mon, 20 Mar 2006 16:49:31 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <26F44F810A51DF42A127BC2A06BE185E03D651CE@pdsmsx404>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <26F44F810A51DF42A127BC2A06BE185E03D651CE@pdsmsx404>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 20 Mar 2006, at 16:08, Dong, Eddie wrote:

Yes, this meets with what Ian and Asit talked in xensummit too. And it
can solve
 the TSC calibration issue as wall-clock (RTC) read is some time later
after
TSC calibration. But it has problem in APIC time calibration side, as
it is done very later in Linux (not sure for other OSes), it is even
later than init
thread creation that is hard to determine in xen.

Hmmm.. in fact it looks like Linux reads CMOS RTC before even calibrating bogomips, so that wouldn't be a good point to disable TSC freezing after all.

Another issue is that some calibration loops read the PIT counter (and would be confused by wrapping), or expect to receive timely interrupts to increment jiffies. Those are hard to guarantee in a virtualised environment. So there's a general timeliness issue as well as the original 'delay loop progress' versus 'time progress' issue.

There's no good way out of this I suspect. If guest time is to track wallclock time then guests are going to have to see time jumping forward across preemptions, or the jumping is simply going to be saved up for some time later (eg. as you do currently when the PIT underflows).

Maybe we should do something really simple like run the guest in 'virtual' (scheduled) time for some number of seconds after boot, then switch to real time (which runs at an accelerated rate for a short while to catch back up with real time)?

A better solution to remove this assumption is that we implement a
mechanism like PIT IRQ output line that will discard accumulated IRQs
during
guest IRQ disable time. I.e. if guest IRQ is disabled,
pickup_deactive_ticks
should ignore the elapsed ticks (only add one more pending IRQ). In this
way
the guest behavior will be exactly same with native. We should put this
in
our TODO list :-)

What effect will this have? Are you suggesting to always run guest time at 'virtual time' rather than real wallclock time?

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel