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

Re: [Xen-devel] query related to NOW()

>  NOW() macro which is used to get current time on xen, makes use of
> rdtscll(). rdtscll reads the 64 bit timer value from the TSC register on
> x86 architecture. AFAIK TSC registers are no longer considered a safe
> guarntee to determine exact timings on SMP, multicore platform as well as
> may give incorrect values when used after a wake up from hibernation.
>  My query is then why is TSC register used in xen to get the current time??
>  Does this means Xen doesnot have good SMP support and also doesnot support
> hibernation? Just to add using TSC register means hampering portability,
> right? Then why does Xen uses it?

As far as I know the TSC is only used for local processor timings in Xen and 
not for synchronisation between processors, so it shouldn't impact the SMP 
support - SMP has been designed in from the start.

Hibernation is currently not supported in Xen but I think folks are working on 
power management and related code.

Portability shouldn't be a problem as non-x86 architectures can implement a 
different time system if required (they probably already do, actually, so it 
might be interesting to look at the different approaches they take).


Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

Xen-devel mailing list



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