Atsushi SAKAI
2007-Jun-12 09:34 UTC
[Xen-devel] [Q] about clock_gettime accuracy on i386(&x86_64).
Hi, I am now compareing clock_gettime() accuracy between Native Linux and Dom0.(i386 and x86_64) Dom0 accuracy is microsecond. (nanosecond 3-digit is not changed keep some value) But Linux accuracy is nanosecond. (nanosecond 3-digit is changed each clock_gettime call) Is there any plan to fix this? Or would you tell me the reason? Thanks Atsushi SAKAI _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Atsushi SAKAI
2007-Jun-13 10:35 UTC
Re: [Xen-devel] [Q] about clock_gettime accuracy on i386(&x86_64).
Hi, I solve previous question, but other problem occured. My question is CLOCK_MONOTONIC is available on PV-guest/x86. CONFIG_GENERIC_TIME is off for current PV-kernel(i386). In this case, directly calls do_gettimeofday. This causes the problem for Xen. do_gettimeofday is not MONOTONIC. this causes clock_gettime(CLOCK_MONOTONIC,&tp) is not monotomic. Is there any plan to solve this problem? I attached the test program for 2CPU case (like Core2Duo). Anyway, the reason for tick changes is that getnstimeofday() changes between Native and PV-guest. In PV kernel, just calls do_gettimeofday.(it causes tickness microsecond.) But In Native Linux Kernel, CONFIG_GENERIC_TIME is on. The function(getnstimeofday()) has an accuracy of nanoseconds at most. Thanks Atsushi SAKAI Atsushi SAKAI <sakaia@jp.fujitsu.com> wrote:> Hi, > > I am now compareing clock_gettime() accuracy > between Native Linux and Dom0.(i386 and x86_64) > > Dom0 accuracy is microsecond. > (nanosecond 3-digit is not changed keep some value) > But Linux accuracy is nanosecond. > (nanosecond 3-digit is changed each clock_gettime call) > > Is there any plan to fix this? > Or would you tell me the reason? > > Thanks > Atsushi SAKAI > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Jun-13 10:46 UTC
Re: [Xen-devel] [Q] about clock_gettime accuracy on i386(&x86_64).
On 13/6/07 11:35, "Atsushi SAKAI" <sakaia@jp.fujitsu.com> wrote:> Is there any plan to solve this problem?gettimeofday() could track last returned timestamp and clamp further timestamps to be no smaller. We probably do need this in our gettimeofday() implementation. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel