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] [PATCH] replace rdtsc emulation-vs-native xen boot optio

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] replace rdtsc emulation-vs-native xen boot option with per-domain (hypervisor part)
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 05 Oct 2009 16:15:18 -0700
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 05 Oct 2009 16:16:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8831fe4f-9002-40b7-8bef-065c505f6b67@default>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <8831fe4f-9002-40b7-8bef-065c505f6b67@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3
On 09/27/09 12:22, Dan Magenheimer wrote:
> Switches rdtsc emulation from boot option to per-domain
> and enables it by default.  Also removes hvm tsc scaling
> as it is no longer necessary.
>
>   

I've run into a few problems from this patch:

   1. I'm seeing occasional messages on the console "hrtimer: interrupt
      too slow, forcing clock min delta to 9001953 ns" which indicates
      that the kernel is noticing that timer operations are taking too long.
   2. A domain can't turn on and off its own tsc emulation state.  I'm
      working on vsyscall support for pvclock (done, aside from this
      issue), so I need native tsc in usermode (or at least, one with
      the same parameters in kernel and userspace).  I was getting very
      confused because I didn't expect emulation to *only* apply to
      usermode; I was expecting it to be done uniformly to both user and
      kernel tscs, with appropriate adjustments to the vcpu_time_info
      values.
   3. The 's' debug key never seems to count any usermode rdtsc
      instructions, even if I write a little program to explicitly
      exercise them.  (Fix below)

All in 64-bit PV domains.

Thanks,
    J

diff -r 1dc86d83b352 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Fri Oct 02 17:01:26 2009 -0700
+++ b/xen/arch/x86/time.c       Mon Oct 05 16:13:15 2009 -0700
@@ -1476,7 +1476,7 @@
     }
     else
     { 
-        v->domain->arch.vtsc_kerncount++;
+        v->domain->arch.vtsc_usercount++;
         spin_lock(&v->domain->arch.vtsc_lock);
         now = get_s_time() + v->domain->arch.vtsc_stime_offset;
         if ( (int64_t)(now - v->domain->arch.vtsc_last) > 0 )



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel