[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [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...

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.