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: [PATCH] Re: [Xen-devel] Time went backwards

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [PATCH] Re: [Xen-devel] Time went backwards
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Tue, 14 Mar 2006 10:13:07 -0500 (EST)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 14 Mar 2006 15:14:09 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <2595229dc26f30439cfcf796060bd28e@xxxxxxxxxxxx>
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: <Pine.LNX.4.63.0603101157290.23847@xxxxxxxxxxxxxxxxxxxxxx> <5cee5f1c21deb3039d4a63748ae45b54@xxxxxxxxxxxx> <ad0d34be2ad1520ecc15c7a33bb56024@xxxxxxxxxxxx> <Pine.LNX.4.63.0603101232350.23847@xxxxxxxxxxxxxxxxxxxxxx> <962617b5496bcddd4ca3560862da9e5a@xxxxxxxxxxxx> <Pine.LNX.4.63.0603101656430.31290@xxxxxxxxxxxxxxxxxxxxxx> <50482ad77399d3f8968130be562d1e96@xxxxxxxxxxxx> <Pine.LNX.4.63.0603131650520.25148@xxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.63.0603131730340.25148@xxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.63.0603131803500.25148@xxxxxxxxxxxxxxxxxxxxxx> <2595229dc26f30439cfcf796060bd28e@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 14 Mar 2006, Keir Fraser wrote:
> On 13 Mar 2006, at 23:07, Rik van Riel wrote:
> 
> > OK, finally nailed it!   When both stolen and blocked are rounded
> > down, it is possible for the final increment of the cpu local
> > processed_system_time to move the cpu local system time ahead a
> > bit further than expected - but still proper wrt. wall clock time.
> 
> Thanks for tracking this down!
> 
> I'm not sure how you mean that rounding down stolen and blocked causes 
> time to get progressed further than expected,

Not initially, but on the next timer tick.  Lets use jiffies as
the time unit in this example:

Tick N:
        delta = 2.2
        stolen = 0.9
        blocked = 0.7

        stolen and blocked will not get incremented, while
        the per-cpu processed_time gets 2 jiffies

Tick N+1:
        delta = 1.5
        stolen = 1.3    (includes the 0.9 from the last tick)
        blocked = 1.1   (includes the 0.7 from the last tick)

        stolen gets incremented by 1, blocked gets incremented
        by 1, and (as a consequence) the per-cpu procssed_time
        gets incremented by 2  -  1 more than it should be!

-- 
All Rights Reversed

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