WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [Q] about clock_gettime accuracy on i386(&x86_64).

To: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Q] about clock_gettime accuracy on i386(&x86_64).
From: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>
Date: Wed, 13 Jun 2007 19:35:44 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 13 Jun 2007 03:35:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200706120935.l5C9ZO7j022223@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200706120935.l5C9ZO7j022223@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

Attachment: pvx86test.c
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>