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-xen : Reset monotonic time when sync up tim

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] time-xen : Reset monotonic time when sync up time from dom0 to domU
From: "Du, Hang" <hdu@xxxxxxxxxxxx>
Date: Tue, 12 Oct 2010 20:24:35 -0700
Accept-language: zh-CN, en-US
Acceptlanguage: zh-CN, en-US
Cc: "Liu, Saipu" <saliu@xxxxxxxxxxxx>, "Yi, Shunli" <syi@xxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 12 Oct 2010 20:26:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4CB4672E020000780001C752@xxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <9C56B6AEEB2D60488B29B880DF7E53BE03C1B2C6B6@xxxxxxxxxxxxxxxxxxxxx> <4CB4672E020000780001C752@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: ActqA2ph0LYTnQ0RSseAkmss7kx4GQAfWtjw
Thread-topic: [Xen-devel] [PATCH] time-xen : Reset monotonic time when sync up time from dom0 to domU
Jan,

Sorry for my brief description in previous mail and missing 
is_initial_xendomain check. The kernel I submit this patch is 
linux-2.6.18-xen-3.4.2, I submit the patch again with in_initial-xendomain 
check.

In this patch, we support the backward time changing sync to all domUs which 
configured to use "dependent wall clock".
Currently, without the backward time syncing, when we change the time backward 
in Dom0, the time in DomU would be froze. 
And this cause some commands hang and don't executed until the time catch up 
with the domU time.
For example:
"rpm -q kernel-xen"
"sleep 1"
Monotonic time should be reset when sync up time from dom0 to domU to support 
domU backward time syncing.

diff -urN a/arch/i386/kernel/time-xen.c   b/arch/i386/kernel/time-xen.c   

--- a/arch/i386/kernel/time-xen.c   2010-10-11 10:41:06.000000000 +0800
+++ b/arch/i386/kernel/time-xen.c   2010-10-11 10:43:32.000000000 +0800
@@ -715,6 +715,8 @@
    }   
 
    if (shadow_tv_version != HYPERVISOR_shared_info->wc_version) {
+        if (!is_initial_xendomain() && !independent_wallclock)
+            monotonic_reset();
        update_wallclock();
        schedule_clock_was_set_work = 1;
    }


 Protected by Websense Hosted Email Security -- www.websense.com 

Attachment: time-xen.patch
Description: time-xen.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>