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-users

Re: [Xen-users] clocksource/0: Time went backwards

To: "Shane D. Johnson" <SDJ@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-users] clocksource/0: Time went backwards
From: Bart Verwilst <lists@xxxxxxxxxxx>
Date: Thu, 11 Oct 2007 01:33:45 +0200 (CEST)
Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 10 Oct 2007 16:34:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <470D5AC3.3080808@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Well, i've found this link earlier: 
http://lists.xensource.com/archives/html/xen-devel/2006-03/msg00442.html , but 
it seems the code has changed quite a bit since then..
Big parts of the patch seem integrated already though.. 
For example:

Current patch, in use in my running kernel:

+       if ((blocked > 0) && (delta_cpu > 0)) {
+               delta_cpu -= blocked;
+               if (unlikely(delta_cpu < 0))
+                       blocked += delta_cpu; /* clamp local-time progress */
+               do_div(blocked, NS_PER_TICK);
+               per_cpu(processed_blocked_time, cpu) += blocked * NS_PER_TICK;
+               per_cpu(processed_system_time, cpu)  += blocked * NS_PER_TICK;


Patch on the link provided above:

        if (stolen > 0) {
                delta_cpu -= stolen;
+               if (unlikely(delta_cpu < 0)) {
+                       stolen += delta_cpu;
+                       delta_cpu = blocked = 0;
+               }
                do_div(stolen, NS_PER_TICK);
                per_cpu(processed_stolen_time, cpu) += stolen * NS_PER_TICK;
                per_cpu(processed_system_time, cpu) += stolen * NS_PER_TICK;

As you can see, quite different.. "delta_cpu = blocked = 0;" is missing, but 
might be handled with the rest of the changes in the new code..

Another possibility is that this only applies for i386 (i'm running on x86_64.. 
)..
I've looked into the patch, and it seems to only patch file 
arch/i386/kernel/time-xen.c .
There isn't a x86_64 equivalent.. ( arch/x86_64/kernel/time-xen.c doesn't exist 
) Is this normal? Could this be the cause?

Thanks a lot for your reply!

Kind regards,

Bart Verwilst

----- Original Message -----
From: "Shane D. Johnson" <SDJ@xxxxxxxxxxxxxxxxxxxxxx>
To: "Bart Verwilst" <lists@xxxxxxxxxxx>
Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
Sent: Thursday, October 11, 2007 1:05:39 AM (GMT+0100) Europe/Berlin
Subject: Re: [Xen-users] clocksource/0: Time went backwards

Bart,
    I haven't had this happen but I  have seen a lot of references to 
similar problems on the mailing list archive.  I would start there and 
see if you can find your fix there.

Shane

Bart Verwilst wrote:
> Just happened again...
> Nobody has an idea what might be happening? This is obviously some kind of 
> bug.. :)
>
> Thanks!
>
> Bart
>
> ----- Original Message -----
> From: "Lists" <lists@xxxxxxxxxxx>
> To: Xen-users@xxxxxxxxxxxxxxxxxxx
> Sent: Wednesday, October 10, 2007 12:08:09 AM (GMT+0100) Europe/Berlin
> Subject: [Xen-users] clocksource/0: Time went backwards
>
> Dear fellow Xen'ers!
>
> I'm having a problem with my new Xen-enabled colocation server.. I hope ( at 
> least ;) ) one of you guys know how to fix this problem..
>
> For a certain amount of time ( 1-2 days ) the domU runs fine.. until the 
> console starts spitting out messages like these:
>
> [80182.004456] clocksource/0: Time went backwards: delta=-6917292717540055641 
> shadow=80182004054805 offset=400471
> [80182.004507] clocksource/0: Time went backwards: delta=-6917292717540005396 
> shadow=80182004054805 offset=450712
> [80182.004762] clocksource/0: Time went backwards: delta=-6917292717539750360 
> shadow=80182004054805 offset=705812
> [80182.004842] clocksource/0: Time went backwards: delta=-6917292717539670405 
> shadow=80182004054805 offset=785744
> [80182.004918] clocksource/0: Time went backwards: delta=-6917292717539594298 
> shadow=80182004054805 offset=861851
>
> The only action left is an xm shutdown, after which an xm create boots up the 
> machine fine for the next couple of days..
>
> I'm running Ubuntu 7.10, with the stock xen kernel ( 2.6.22-13-xen ).
>
> An ubuntu bug has already been reported and appended to by multiple persons 
> here:
>
> https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/146924
>
> Anyone have any ideas/patches/hints/.../anything that can help?
>
> Thanks a lot guys!
>
> Kind regards,
>
> Bart Verwilst
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
>   


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