From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] Adjust time init sequence Date: Thu, 11 Dec 2008 00:44:44 +0000 Message-ID: References: <0A882F4D99BBF6449D58E61AAFD7EDD603BB491E@pdsmsx502.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <0A882F4D99BBF6449D58E61AAFD7EDD603BB491E@pdsmsx502.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Tian, Kevin" , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 11/12/2008 00:23, "Tian, Kevin" 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)? -- Keir