query related to NOW() Hi All, 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? Any pointers or links please. Please CMIIW. Thank you. Pradeep Singh DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 27/2/07 10:03, "Pradeep Singh, TLS-Chennai" <pradeep_s@hcl.in> wrote:> 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?Scale factors and timestamps are provided by the hypervisor which allow the guest to safely convert the result of RDTSC into a meaningful portable time value. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 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). Cheers, Mark -- 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 Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel