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] Adjust time init sequence

To: 'Keir Fraser' <keir.fraser@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] Adjust time init sequence
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 11 Dec 2008 08:47:27 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Wed, 10 Dec 2008 16:48:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C56612FC.2011A%keir.fraser@xxxxxxxxxxxxx>
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: <0A882F4D99BBF6449D58E61AAFD7EDD603BB491E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <C56612FC.2011A%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AclayLVCCL6aQHvlSCiWfWMkyOK68AABWP7wABXIhpAAARtcGAAAAhtQ
Thread-topic: [Xen-devel] [PATCH] Adjust time init sequence
>From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx] 
>Sent: Thursday, December 11, 2008 8:45 AM
>
>On 11/12/2008 00:23, "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:
>
>>> Is it really safe to use NOW() before init_percpu_time()? 
>Seems dodgy.
>> 
>> Where did you mean by using NOW before init_percpu_time?
>> I moved do_settime earlier but with a zero system stamp now
>> which matches the line behind to init stime_platform_time to zero.
>> To me there's no difference to initialize wallclock at zero point
>> or sometime after with a NOW() drift, which should cause similar
>> result to wc_sec/wc_nsec.
>
>init_platform_time() -> plt_overflow() -> NOW()
>
>Perhaps the above is safe though? Will NOW() return zero for an
>uninitialised per-cpu time sstructure (since stime_local_stamp 
>and tsc_scale
>are both zero)?
>

I guess not, due to same reason as why I sent out 1st patch idle 
vcpu state entry. The point is the current TSC value, which count 
from power on and is translated to a dozens of seconds for elapsed
time upon a zero tsc stamp. :-( I didn't realize that point in the start...

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